View source: R/makeShinyFiles.R
makeShinyFiles | R Documentation |
Generate data files required for shiny app. Five files will be generated,
namely (i) the shinycell config prefix_conf.rds
, (ii) the gene
mapping object config prefix_gene.rds
, (iii) the single-cell gene
expression prefix_gexpr.h5
, (iv) the single-cell metadata
prefix_meta.rds
and (v) the defaults for the Shiny app
prefix_def.rds
. A prefix is specified in each file to allow for the
use of multiple single-cell datasets in one Shiny app. Note that both
makeShinyFiles
and makeShinyCodes
functions are ran when
running the wrapper function makeShinyApp
.
makeShinyFiles(
obj,
scConf,
gex.assay = NA,
gex.slot = c("data", "scale.data", "counts"),
gene.mapping = FALSE,
shiny.prefix = "sc1",
shiny.dir = "shinyApp/",
default.gene1 = NA,
default.gene2 = NA,
default.multigene = NA,
default.dimred = NA,
chunkSize = 500
)
obj |
input single-cell object for Seurat (v3+) / SingleCellExperiment data or input file path for h5ad / loom files |
scConf |
shinycell config data.table |
gex.assay |
assay in single-cell data object to use for plotting gene expression, which must match one of the following:
|
gex.slot |
slot in single-cell assay to plot. This is only used for Seurat objects (v3+). Default is to use the "data" slot |
gene.mapping |
specifies whether to convert human / mouse Ensembl gene
IDs (e.g. ENSG000xxx / ENSMUSG000xxx) into "user-friendly" gene symbols.
Set this to |
shiny.prefix |
specify file prefix |
shiny.dir |
specify directory to create the shiny app in |
default.gene1 |
specify primary default gene to show |
default.gene2 |
specify secondary default gene to show |
default.multigene |
character vector specifying default genes to show in bubbleplot / heatmap |
default.dimred |
character vector specifying the two default dimension reductions. Default is to use UMAP if not TSNE embeddings |
chunkSize |
number of genes written to h5file at any one time. Lower this number to reduce memory consumption. Should not be less than 10 |
data files required for shiny app
John F. Ouyang
makeShinyFiles(seu, scConf, gex.assay = "RNA", gex.slot = "data",
shiny.prefix = "sc1", shiny.dir = "shinyApp/",
default.gene1 = "GATA3", default.gene2 = "DNMT3L",
default.multigene = c("ANPEP","NANOG","ZIC2","NLGN4X","DNMT3L",
"DPPA5","SLC7A2","GATA3","KRT19"),
default.dimred = c("UMAP_1", "UMAP_2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.