| BioGSP-package | R Documentation |
The BioGSP package provides a comprehensive implementation of Graph Signal Processing (GSP) methods including Spectral Graph Wavelet Transform (SGWT) for analyzing spatial patterns in biological data. This implementation is based on Hammond, Vandergheynst, and Gribonval (2011) "Wavelets on Graphs via Spectral Graph Theory".
The package enables multi-scale analysis of spatial signals by:
Building graphs from spatial coordinates using k-nearest neighbors
Computing graph Laplacian eigendecomposition for spectral analysis
Designing wavelets in the spectral domain using various kernel functions
Decomposing signals into scaling and wavelet components at multiple scales
Providing reconstruction capabilities with error analysis
Offering comprehensive visualization and analysis tools
initSGWTInitialize SGWT object with data and parameters
runSpecGraphBuild graph and compute eigendecomposition
runSGWTPerform forward and inverse SGWT transforms
runSGCCCalculate weighted similarity between signals
sgwt_forwardForward SGWT transform
sgwt_inverseInverse SGWT transform
sgwt_energy_analysisEnergy distribution analysis
plot_sgwt_decompositionVisualization of SGWT components
demo_sgwtDemonstration with synthetic data
The BioGSP package is particularly useful for:
Spatial biology: Analyzing cell distribution patterns in tissue imaging (CODEX, Visium, etc.)
Single-cell genomics: Spatial transcriptomics and proteomics analysis
Neuroscience: Brain connectivity and signal analysis
Pathology: Tumor microenvironment and tissue architecture analysis
Developmental biology: Spatial pattern formation and cell fate mapping
Immunology: Immune cell spatial organization and interactions
BioGSP Development Team
Hammond, D. K., Vandergheynst, P., & Gribonval, R. (2011). Wavelets on graphs via spectral graph theory. Applied and Computational Harmonic Analysis, 30(2), 129-150.
Useful links:
# Load the package
library(BioGSP)
# Run a quick demo
demo_result <- demo_sgwt()
# Generate synthetic data
set.seed(123)
n <- 100
data <- data.frame(
x = runif(n, 0, 10),
y = runif(n, 0, 10),
signal = sin(runif(n, 0, 2*pi))
)
# New workflow: Initialize -> Build Graph -> Run SGWT
SG <- initSGWT(data, signals = "signal", J = 4, kernel_type = "heat")
SG <- runSpecGraph(SG, k = 8)
SG <- runSGWT(SG)
# Analyze results
energy_analysis <- sgwt_energy_analysis(SG)
print(energy_analysis)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.