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
make_file
and make_code
functions are ran when
running the wrapper function make_app
.
make_file(
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,
mar = FALSE
)
input single-cell object for Seurat (v3+) / SingleCellExperiment data or input file path for h5ad / loom files
shinycell config data.table
assay in single-cell data object to use for plotting gene expression, which must match one of the following:
Seurat objects: "RNA" or "integrated" assay, default is "RNA"
SCE objects: "logcounts" or "normcounts" or "counts", default is "logcounts"
h5ad files: "X" or any assay in "layers", default is "X"
loom files: "matrix" or any assay in "layers", default is "matrix"
slot in single-cell assay to plot. This is only used for Seurat objects (v3+). Default is to use the "data" slot
specifies whether to convert human / mouse Ensembl gene
IDs (e.g. ENSG000xxx / ENSMUSG000xxx) into "user-friendly" gene symbols.
Set this to TRUE
if you are using Ensembl gene IDs. Default is
FALSE
which is not to perform any conversion. Alternatively, users
can supply a named vector where names(gene.mapping)
correspond
to the actual gene identifiers in the gene expression matrix and
gene.mapping
correspond to new identifiers to map to
specify file prefix
specify directory to create the shiny app in
specify primary default gene to show
specify secondary default gene to show
character vector specifying default genes to show in bubbleplot / heatmap
character vector specifying the two default dimension reductions. Default is to use UMAP if not TSNE embeddings
number of genes written to h5file at any one time. Lower this number to reduce memory consumption. Should not be less than 10
Logical indicating if marker genes are used
data files required for shiny app