Skip to contents

Package Overview

Package-level documentation

SVG SVG-package
SVG: Spatially Variable Genes Detection Methods for Spatial Transcriptomics

Unified Interface

Main entry point for SVG detection

CalSVG()
Unified Interface for SVG Detection

SVG Detection Methods

Individual SVG detection method implementations

CalSVG_MERINGUE()
MERINGUE: Moran's I based Spatially Variable Gene Detection
CalSVG_binSpect()
binSpect: Binary Spatial Enrichment Test for SVG Detection
CalSVG_SPARKX()
SPARK-X: Non-parametric Kernel-based SVG Detection
CalSVG_Seurat()
Seurat-style SVG Detection Methods
CalSVG_nnSVG()
nnSVG: Nearest-Neighbor Gaussian Process SVG Detection
CalSVG_MarkVario()
Detect SVGs using Mark Variogram Method

Spatial Network Utilities

Functions for building spatial neighborhood networks

utils_spatial
Spatial Network Utilities
buildSpatialNetwork()
Build Spatial Neighborhood Network
getSpatialNeighbors_Delaunay()
Build Spatial Network via Delaunay Triangulation
getSpatialNeighbors_KNN()
Build Spatial Network via K-Nearest Neighbors
adj_to_edgelist()
Convert Adjacency Matrix to Edge List
row_standardize()
Row Standardize Adjacency Matrix

Statistical Utilities

Statistical functions used by SVG methods

utils_stats
Statistical Utilities for SVG Detection
moranI()
Calculate Moran's I Statistic
moranI_test()
Moran's I Test for Spatial Autocorrelation
ACAT_combine()
ACAT: Aggregated Cauchy Association Test
binarize_expression()
Binarize Gene Expression
davies_pvalue()
Davies' Method for Quadratic Form P-values
liu_pvalue()
Liu's Method for Approximating P-values
lisa_test()
Local Indicators of Spatial Association (LISA)

Data Simulation

Functions for generating simulated spatial data

data_simulation
Simulate Spatial Transcriptomics Data with Known SVGs
simulate_spatial_data()
Simulate Spatial Transcriptomics Data
generate_spatial_pattern()
Generate Spatial Expression Pattern
generate_hexagonal_grid()
Generate Hexagonal Grid Coordinates
generate_square_grid()
Generate Square Grid Coordinates
generate_random_coords()
Generate Random Coordinates

Example Data

Built-in example datasets

example_svg_data
Example Spatial Transcriptomics Data

C++ Accelerated Functions

High-performance C++ implementations

moranI_cpp()
Fast Row-wise Moran's I Calculation
moranI_full_cpp()
Fast Moran's I with Full Statistics
binarize_kmeans_cpp()
Fast Binarization using K-means (k=2)
dist_matrix_cpp()
Fast Distance Matrix Computation
knn_adj_cpp()
Build KNN Adjacency Matrix
fisher_spatial_cpp()
Compute Fisher's Exact Test for Spatial Enrichment