multiGenePlots | R Documentation |
Plot Spatial Patterns of Multiple Genes
multiGenePlots(x, ...)
## S4 method for signature 'matrix'
multiGenePlots(
x,
coordinates,
genes_plot,
viridis_option = "D",
ncol = 2,
point_size = 1,
dark_theme = TRUE
)
## S4 method for signature 'SpatialExperiment'
multiGenePlots(
x,
assay_type = "counts",
genes_plot,
viridis_option = "D",
ncol = 2,
point_size = 1,
dark_theme = TRUE
)
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
|
genes_plot |
character vector specifying which genes are to be plotted. |
viridis_option |
This function uses the |
ncol |
Number of columns to arrange the plots. |
point_size |
Point size of each plot. |
dark_theme |
Whether dark background should be used; this is helpful to
highlight cells with high expression when using the |
assay_type |
A |
This function draws a plot for each specified genes
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()
,
spatialDE()
.
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
results <- spatialDE(spe)
ordered_spe_results <- results[order(results$qval), ]
head(ordered_spe_results)
plots <- multiGenePlots(spe,
assay_type = "counts",
ordered_spe_results$g,
point_size = 4,
viridis_option = "D"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.