SpatialDE | R Documentation |
SpatialDE is a method to identify and characterize spatially variable (SV) genes via a statistical test.
SpatialDE(norm.expr, spots, gene.name = NULL)
norm.expr |
A numeric vector p of length n that denotes the relative gene expression levels. Each entry is a numeric value that denotes the normalized gene count at spot i. |
spots |
An n-by-2 numeric matrix T to represent the geospatial profile, where each row indicates the spot location in the grid. |
gene.name |
A character string that specifies the name of the gene
passed. To be used when storing the results. The default value is |
This method builds on Gaussian process regression, a class of models. For a given gene, the expression variability is decomposed into spatial and non-spatial components, using two random effect terms: a spatial variance term that parametrizes gene expression covariance by pairwise distances of samples, and a noise term that models non-spatial variability. The ratio of the variance explained by these two components quantifies the Fraction of Spatial Variance (FSV). Significant SV genes can be identified by comparing this full model to a model without the spatial variance component.
See https://bioconductor.org/packages/release/bioc/html/spatialDE.html for more information.
SpatialDE
returns an object of class "SpatialDE
".
The function base::print()
i.e., print.SpatialDE()
, can be used to
print a summary of the results.
An object of class "SpatialDE
" is a list containing the following components:
call |
the function call in which all of the specified arguments are specified by their full names. |
model |
the name of statistical model or technique. |
gene.name |
the name of gene evaluated. |
summary |
a summary table that contains a summary of the model. |
measures |
the estimated p-value. |
time |
the execution time of the function. |
Corso D, Malfait M, Moses L (2021). spatialDE: R wrapper for SpatialDE. doi: 10.18129/B9.bioc.spatialDE, R package version 1.0.0, http://www.bioconductor.org/packages/spatialDE.
Svensson V, Teichmann SA, Stegle O (2018). "SpatialDE: identification of spatially variable genes." Nature Methods, 15(5), 343–346. ISSN 1548-7105, doi: 10.1038/nmeth.4636, https://www.nature.com/articles/nmeth.4636.
normalize.st()
for normalizing the expression levels;
print.SpatialDE()
for printing a summary of results to console.
library(boost) ## load sample dataset data(mob) ## scale gene expression levels and extract one gene mob.t <- normalize.st(mob, scaling.method = "TSS") g <- mob.t[, "Apoe"] ## run the statistical test res <- SpatialDE(g, mob.spots, gene.name = "Apoe") print(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.