This module facilitates writing R-based apps for FASTGenomics and is analogous to the python module implemented here.
If your app (meaning, the manifest.json
of your app) is located under /app
directory
and the FASTGenomics input directory is under /fastgenomics
you can instantiate the
process class as follows
library(fastgenomicsR)
proc <- fastgenomicsR::Process(app_dir="/app", data_dir="/fastgenomics")
You can access the parameters under proc@params
, for example
proc@params$my_parameter # -> 101
while input and output files are under proc@input
and proc@output
respectively. To
read the contents of an input file use read.table
genes = read.table(proc@input$gene_metadata)
and to write use write.table
write.table(genes, proc@output$gene_metadata)
If you want to use the Seurat Toolkit in your FASTGenomics app you can read and write Seurat Objects as follows
# Read a Seurat Object. This requires exactly a single input file mapping of type 'seurat' in proc@input.
seurat_object <- fastgenomicsR::read_seurat(proc)
# Do something with your Seurat Object.
seurat_object <- NormalizeData(seurat_object)
# Write the Seurat Object. This requires exactly a single output file mapping of type 'seurat' in proc@output.
fastgenomicsR::write_seurat(proc, seurat_object)
Don't forget to install the Seurat Toolkit in your app's docker container.
In readLines(x) :
incomplete final line found on '...../manifest.json'
Add a blank line at the end of your manifest. R is unable to cope with files which do not have a blank line at the end of the file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.