Skip to content

Spatially Variable Genes Detection Methods for Spatial Transcriptomics

0packages depend
2.1Kdownloads / year
46.2%test coverage
13/13flavors OK

Overview

About

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.

Changes in 1.0.0

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 network
  • CalSVG_Seurat(): Moran's I with inverse distance weights
  • CalSVG_binSpect(): Binary spatial enrichment test (Giotto)
  • CalSVG_SPARKX(): Non-parametric kernel-based test
  • CalSVG_nnSVG(): Nearest-neighbor Gaussian processes
  • CalSVG_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 network
  • getSpatialNeighbors_KNN(): K-nearest neighbors network

Statistical Utilities

  • moranI(): Calculate Moran's I statistic
  • moranI_test(): Hypothesis testing for spatial autocorrelation
  • ACAT_combine(): Aggregated Cauchy Association Test for p-value combination
  • binarize_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_threads parameter
  • 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

CRAN checks
13OK
Slowest check: 3.4 min · r-devel-windows-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 1.0.0
READMEYes · 577 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 1.0.0Citation fileNoWebsiteYes · pkgdown
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

2.1K
CRAN downloads in the past year
Rank #17,260 · ~6/day · ~171/mo
Daily download trend is not available in this view yet.
25430 days
74790 days
2.1K1 year
Compare downloads with other packages →
Also on255 r2u6 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-01-23
Responsiveness
not measured
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conductContributing guide
Docs source (3)
pkgdown

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)

Coverage (1)
Coverage reporting
Show all practicesHide 1 practice
CRAN release process (1)
cran-comments.md
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing SVG adds 2 packages (2 with compiled code, 2.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB.

Depends (1)
R >= 4.0.0
Imports (6)
parallelstatsutilsmethodsMASSRcpp
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.0.0 (2026)
Contributor
Original method implementations
Releases (1)
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.0Latest
    2026-02-01 · current release
  • R
    R 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")
Liu, Z., & Contributors, S. (2026). SVG: Spatially Variable Genes Detection Methods for Spatial Transcriptomics (Version 1.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for SVG version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy