runShiny | R Documentation |
This command runs the Shiny interactive visualization from a saved data file.
runShiny(
filePath,
outPath,
cellMarkers = list(),
annotationDB,
rownameKeytype,
imageFileType = "png",
...
)
filePath |
A character vector giving the relative filepath to an RData
file containing two objects: the |
outPath |
Optional. If you'd like to save/load any analysis files
to/from a different directory than the input directory (for example, if
you're using data from a package), specify that directory here. Otherwise
any files generated by the Shiny app (ie. saving the selected cluster
solution, saving custom set DE testing results) will be saved/loaded in
|
cellMarkers |
Optional. If you have canonical marker genes for expected
cell types, list them here (see example code below). Note that the gene
names must match rownames of your data (ie. use ensembl IDs if your gene
expression matrix rownames are ensembl IDs). The Shiny app will attempt to
label clusters in the tSNE projection by highest median gene expression.
See |
annotationDB |
Optional. An AnnotationDbi object for your data's species
(ie. |
rownameKeytype |
Optional. A character vector indicating the
AnnotationDbi keytype (see
|
imageFileType |
Default="png". The file format for saved figures. One of
|
... |
Named options that should be passed to the
|
The function causes the scClustViz Shiny GUI app to open in a seperate window.
sCVdata
for the input data type, and
CalcAllSCV
or CalcSCV
to do the calculations
necessary for this function.
## Not run:
your_cluster_columns <- grepl("res[.0-9]+$",
names(getMD(your_scRNAseq_data_object)))
# ^ Finds the cluster columns of the metadata in a Seurat object.
your_cluster_results <- getMD(your_scRNAseq_data_object)[,your_cluster_columns]
sCVdata_list <- CalcAllSCV(inD=your_scRNAseq_data_object,
clusterDF=your_cluster_results,
exponent=exp(1),
pseudocount=1,
DRthresh=0.1,
DRforClust="pca",
testAll=F,
FDRthresh=0.05,
calcSil=T,
calcDEvsRest=T,
calcDEcombn=T)
save(your_scRNAseq_data_object,sCVdata_list,
file="for_scClustViz.RData")
# Lets assume this is data from an embryonic mouse cerebral cortex:
# (This is the function call wrapped by MouseCortex::viewMouseCortex("e13"))
runShiny(filePath="for_scClustViz.RData",
outPath="./",
# Save any further analysis performed in the app to the
# working directory rather than library directory.
annotationDB="org.Mm.eg.db",
# This is an optional argument, but will add annotations.
cellMarkers=list("Cortical precursors"=c("Mki67","Sox2","Pax6",
"Pcna","Nes","Cux1","Cux2"),
"Interneurons"=c("Gad1","Gad2","Npy","Sst","Lhx6",
"Tubb3","Rbfox3","Dcx"),
"Cajal-Retzius neurons"="Reln",
"Intermediate progenitors"="Eomes",
"Projection neurons"=c("Tbr1","Satb2","Fezf2",
"Bcl11b","Tle4","Nes",
"Cux1","Cux2","Tubb3",
"Rbfox3","Dcx")
)
# This is a list of canonical marker genes per expected cell type.
# The app uses this list to automatically annotate clusters.
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.