run {spatialDE}R Documentation

Perform SpatialDE test

Description

Wraps the run function from the SpatialDE Python package.

Usage

run(x, coordinates, verbose = FALSE)

Arguments

x

matrix-like object of normalized counts. E.g. resulting from regress_out().

coordinates

data.frame with sample coordinates. Each row is a sample, the columns with coordinates must be named 'x' and 'y'.

verbose

logical controlling the display of the progress bar.

Value

A data.frame with DE results where each row is a gene and columns contain relevant statistics.

The most important columns are:

References

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

Examples

set.seed(42)
mock <- mockSVG(size = 10, tot_genes = 500, de_genes = 10)
stabilized <- stabilize(mock$counts)
sample_info <- mock$coordinates
sample_info$total_counts <- colSums(mock$counts)
regressed <- regress_out(counts = stabilized, sample_info = sample_info)

## Run SpatialDE
de_results <- run(regressed, coordinates = mock$coordinates)


[Package spatialDE version 1.0.0 Index]