Spatially Variable Genes Detection Methods for Spatial Transcriptomics
Overview
A unified framework for detecting spatially variable genes (SVGs) in spatial transcriptomics data. This package integrates multiple state-of-the-art SVG detection methods including 'MERINGUE' (Moran's I based spatial autocorrelation), 'Giotto' binSpect (binary spatial enrichment test), 'SPARK-X' (non-parametric kernel-based test), and 'nnSVG' (nearest-neighbor Gaussian processes). Each method is implemented with optimized performance through vectorization, parallelization, and 'C++' acceleration where applicable. Methods are described in Miller et al. (2021) doi:10.1101/gr.271288.120, Dries et al. (2021) doi:10.1186/s13059-021-02286-2, Zhu et al. (2021) doi:10.1186/s13059-021-02404-0, and Weber et al. (2023) doi:10.1038/s41467-023-39748-z.
First Release
New Features
- **Unified interface**:
CalSVG()function provides a single entry point for all SVG detection methods - **Six SVG detection methods** implemented with consistent output format:
CalSVG_MERINGUE(): Moran's I with binary spatial networkCalSVG_Seurat(): Moran's I with inverse distance weightsCalSVG_binSpect(): Binary spatial enrichment test (Giotto)CalSVG_SPARKX(): Non-parametric kernel-based testCalSVG_nnSVG(): Nearest-neighbor Gaussian processesCalSVG_MarkVario(): Mark variogram method
Spatial Network Construction
buildSpatialNetwork(): Build spatial neighborhood networks using Delaunay triangulation or KNN
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
getSpatialNeighbors_Delaunay(): Delaunay triangulation-based networkgetSpatialNeighbors_KNN(): K-nearest neighbors network
Statistical Utilities
moranI(): Calculate Moran's I statisticmoranI_test(): Hypothesis testing for spatial autocorrelationACAT_combine(): Aggregated Cauchy Association Test for p-value combinationbinarize_expression(): Multiple methods for expression binarization
Data Simulation
simulate_spatial_data(): Generate simulated spatial transcriptomics data with known SVGs- Support for multiple spatial patterns: gradient, hotspot, periodic, cluster
Performance
- C++ implementation via Rcpp/RcppArmadillo for computationally intensive operations
- Parallel processing support via
n_threadsparameter - Efficient memory usage for large-scale data
Documentation
- Comprehensive vignette with mathematical background
- Complete function documentation with examples
- Benchmark comparison between methods
Dependencies
- Core: Matrix, Rcpp, RcppArmadillo
- Optional: geometry, RANN, BRISC, CompQuadForm, BiocParallel, spatstat
Authors
- Zaoqu Liu (maintainer) - liuzaoqu@163.com
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-04-10
Show 2 earlier changesHide 2 earlier changes
- ERROR13 OK, 1 ERROR2026-04-09
- OK14 OK2026-03-10
Documentation
- Help pages
- 37 (18 internal)includes a package overview page
- Examples that run
- 88%14 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 27%
Downloads
Repository
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/zaoqu-liu/svg on 2026-10-25.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-01-23 · The repository has a site deploy workflow
pkgdown site last built 2026-01-23, before release 1.0.0 (2026-02-01)
Show all practicesHide 1 practice
Dependencies
Installing SVG adds 2 packages (2 with compiled code, 2.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- 1.0.0Latest2026-02-01 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-02-01
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.0.0
- Bundled data
- 198 KB / 1 file
- Download size
- 1.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("SVG")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.