If you are already using Seurat for your analysis, VISION provides a convenience function for creating a Vision object from a Seurat object.
assay = "RNA"
, though this parameter is configurable.obj@[[assay]]@counts
is used as the expression input (after normalizing to a library size of 10,000)obj@meta.data
Reductions(obj)
dimRed
parameter can be used to select a different dimensionality reduction for thisdimRedComponents
can be used to limit the number of components used (Default: All components)IntegrateData
When using IntegrateData
, a new assay is created called integrated
.
We recommend creating your reduced-dimensional representation using this assay by running PCA in Seurat after IntegrateData
.
Then create the Vision object, but use the default assay="RNA"
.
Why not use the integrated expression data? Typically this data only consists of a subset of the genes (e.g. 2000 highly-variable genes) and so is not ideal for matching genes in signatures.
Assuming you already have a Seurat object defined as seurat.obj
, you can use it in this way:
signatures <- c("data/h.all.v5.2.symbols.gmt") vision.obj <- Vision(seurat.obj, signatures = signatures) vision.obj <- analyze(vision.obj) viewResults(vision.obj)
The above call would take the "pca" dimensionality reduction from seurat.obj
if it is defined. If you instead had run a Diffusion Map using Seurat and wanted to use that as your latent space, you could specify that like this:
vision.obj <- Vision(seurat.obj, signatures = signatures, dimRed <- "dm")
Any of the other Vision()
constructor parameters can also be passed here. For example, if you wanted to enable microclustering with 5 cells per micropool:
vision.obj <- Vision(seurat.obj, signatures = signatures, pool = T, cellsPerPartition = 5 )
By default, Vision will still run tSNE as part of the main analysis pipeline. You may wish to skip this if a visualization has already been run in Seurat. To instruction VISION to not run any additional visualization projections, set projection_methods = NULL
like so:
vision.obj <- Vision(seurat.obj, signatures = signatures, projection_methods = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.