Description Usage Arguments Value Examples
View source: R/spatialProcess.R
Adds metadata required for downstream analyses, and (optionally) performs PCA on log-normalized expression of top HVGs.
1 2 3 4 5 6 7 8 9 10 | spatialPreprocess(
sce,
platform = c("Visium", "ST"),
n.PCs = 15,
n.HVGs = 2000,
skip.PCA = FALSE,
log.normalize = TRUE,
assay.type = "logcounts",
BSPARAM = BiocSingular::ExactParam()
)
|
sce |
SingleCellExperiment to preprocess |
platform |
Spatial sequencing platform. Used to determine spot layout and neighborhood structure (Visium = hex, ST = square). |
n.PCs |
Number of principal components to compute. We suggest using the top 15 PCs in most cases. |
n.HVGs |
Number of highly variable genes to run PCA upon. |
skip.PCA |
Skip PCA (if dimensionality reduction was previously computed.) |
log.normalize |
Whether to log-normalize the input data with scater. May be omitted if log-normalization previously computed. |
assay.type |
Name of assay in |
BSPARAM |
A BiocSingularParam object specifying which
algorithm should be used to perform the PCA. By default, an exact PCA is
performed, as current spatial datasets are generally small (<10,000 spots).
To perform a faster approximate PCA, please specify
|
SingleCellExperiment with PCA and SC.MEB metadata
1 2 3 4 | ## read the simulated data
data(sce)
platform = "ST"
out = find_neighbors2(sce, platform)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.