| Title: | Spatial Differential Expression via Spatial Autoregressive GLMs |
|---|---|
| Description: | A robust, parallelized statistical framework optimized for identifying spatially differential expression in high-throughput spatial transcriptomics datasets. The package extends standard negative binomial generalized linear models (GLMs) by incorporating continuous physical tissue spot coordinates as distance-weighted local smoothing covariates. This configuration models spatial context seamlessly without relying on pre-annotated categorical tissue clusters. The underlying distance matrix evaluations and coordinate smoothing routines are accelerated natively via an optimized C++ Armadillo matrix engine to guarantee computational efficiency. Built to integrate natively into the Bioconductor ecosystem, the package operates directly on SpatialExperiment containers, incorporates robust library-size normalization scaling factor offsets, calculates adjusted p-values for multi-gene profiles, and supplies an interactive Shiny-based point-and-click visualization dashboard tool for downstream exploratory data analysis. |
| Authors: | Sahal Paladan [aut, cre] |
| Maintainer: | Sahal Paladan <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.2 |
| Built: | 2026-09-23 11:30:28 UTC |
| Source: | https://github.com/BiocStaging/spatialDESeq |
Generate Mock Spatial Transcriptomics Data
make_mock_spatial()make_mock_spatial()
A SpatialExperiment object with synthetic counts and coordinates.
se <- make_mock_spatial()se <- make_mock_spatial()
Plot Spatial Differential Expression Results
plotSpatialDESeq(se, gene_id, metric = c("expression", "spatial_effect"))plotSpatialDESeq(se, gene_id, metric = c("expression", "spatial_effect"))
se |
An analyzed SpatialExperiment object. |
gene_id |
Character. Gene target to visualize. |
metric |
Character. Choose "expression" or "spatial_effect". |
A ggplot2 object.
se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) plotSpatialDESeq(analyzed, gene_id = "Gene1", metric = "expression")se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) plotSpatialDESeq(analyzed, gene_id = "Gene1", metric = "expression")
Generate Volcano Plot for Spatial Differential Expression
plotVolcano(se, alpha = 0.05, effect_cutoff = 0.5)plotVolcano(se, alpha = 0.05, effect_cutoff = 0.5)
se |
An analyzed SpatialExperiment object. |
alpha |
Numeric. Significance value cutoff. |
effect_cutoff |
Numeric. Threshold for effect markings. |
A ggplot2 object.
se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) plotVolcano(analyzed)se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) plotVolcano(analyzed)
Compute Row-Normalized Spatial Weights
rcpp_spatial_weights(coords, radius)rcpp_spatial_weights(coords, radius)
coords |
Numeric matrix of physical spots coordinates. |
radius |
Distance radius. |
Matrix of physical distance weights.
coords <- matrix(runif(20), ncol = 2) rcpp_spatial_weights(coords, radius = 0.5)coords <- matrix(runif(20), ncol = 2) rcpp_spatial_weights(coords, radius = 0.5)
Launch Interactive Spatial Data Explorer
runExplorer(se)runExplorer(se)
se |
An analyzed SpatialExperiment object. |
Opens an interactive Shiny dashboard page in the web browser. None returned.
## Not run: se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) runExplorer(analyzed) ## End(Not run)## Not run: se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5) runExplorer(analyzed) ## End(Not run)
Multithreaded Spatial Differential Expression Analysis
spatialDESeq(se, design, radius = 2.5, BPPARAM = BiocParallel::bpparam())spatialDESeq(se, design, radius = 2.5, BPPARAM = BiocParallel::bpparam())
se |
A SpatialExperiment object. |
design |
A formula specifying experimental variables (e.g., ~ condition). |
radius |
Numeric. Distance radius for local spatial neighbors. |
BPPARAM |
A BiocParallelParam object defining core backend allocation. |
A SpatialExperiment object with analysis results appended to rowData.
se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5)se <- make_mock_spatial() analyzed <- spatialDESeq(se, design = ~ condition, radius = 2.5)