Description Usage Arguments Details Value Examples
Run method to identify spatially variable genes (SVGs) using BRISC.
1 | runSVGsBRISC(spe, x = NULL, lr_test = TRUE, n_threads = 1, verbose = FALSE)
|
spe |
|
x |
|
lr_test |
|
n_threads |
|
verbose |
|
Run method to identify spatially variable genes (SVGs) using BRISC ("bootstrap for rapid inference on spatial covariances") methodology (Saha and Datta 2018).
This function runs BRISC separately for each gene, using parallelization for faster runtime using one core per BRISC run. The main outputs of interest are the covariance parameter estimates stored in 'Theta' in the BRISC output (sigma.sq, tau.sq, phi). We use these estimates to perform inference on the 'sigma.sq' parameter, and to calculate an effect size estimate defined as the proportion of spatial variance out of total variance, 'prop_sv' = 'sigma.sq / (sigma.sq + tau.sq)'.
Significant SVGs can then be identified as those with a highly significant p-value from 'sigma.sq' and large effect size 'prop_sv'.
Assumes the input object is a SpatialExperiment
containing an assay
named logcounts
, which has been filtered to exclude very low-expressed
genes, e.g. as prepared with preprocessSVGs
.
Returns output values stored as new columns in rowData
in the
spe
SpatialExperiment
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(SpatialExperiment)
library(STexampleData)
library(spatzli)
spe <- Visium_humanDLPFC()
spe <- preprocessSVGs(spe)
# subset 1 gene
spe_1 <- spe[1, ]
system.time({
spe_1 <- runSVGsBRISC(spe_1, verbose = TRUE)
})
# subset 100 genes and use parallelization
# spe_100 <- spe[1:100, ]
# spe_100 <- runSVGsBRISC(spe_100, n_threads = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.