spatialDE | R Documentation |
Identify genes that significantly depend on spatial coordinates with the SpatialDE Python package.
spatialDE(x, ...)
## S4 method for signature 'matrix'
spatialDE(x, coordinates, verbose = FALSE)
## S4 method for signature 'SpatialExperiment'
spatialDE(x, assay_type = "counts", verbose = FALSE)
x |
A numeric Alternatively, a SpatialExperiment object. |
... |
For the generic, arguments to pass to specific methods. |
coordinates |
A For the SpatialExperiment method, coordinates are taken from
|
verbose |
A |
assay_type |
A |
A data.frame
with DE results where each row is a gene and columns
contain relevant statistics.
The most important columns are:
g
: the name of the gene
pval
: the p-value for spatial differential expression
qval
: the q-value, indicating significance after correcting for
multiple testing
l
: A parameter indicating the distance scale a gene changes expression
over
Davide Corso, Milan Malfait, Lambda Moses
Svensson, V., Teichmann, S. & Stegle, O. SpatialDE: identification of spatially variable genes. Nat Methods 15, 343–346 (2018). https://doi.org/10.1038/nmeth.4636
SpatialDE 1.1.3: the version of the Python package used under the hood.
The individual steps performed by this function: stabilize()
,
regress_out()
and run()
.
For further analysis of the DE results:
model_search()
and spatial_patterns()
.
## Mock up a SpatialExperiment object wit 400 cells and 3 genes
set.seed(42)
spe <- mockSVG(size = 20, tot_genes = 3, de_genes = 1, return_SPE = TRUE)
## Run spatialDE
de_results <- spatialDE(spe)
head(de_results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.