Learn R Programming

BioGSP (version 1.0.0)

BioGSP-package: BioGSP: Biological Graph Signal Processing for Spatial Data Analysis

Description

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".

Arguments

Main Functions

initSGWT

Initialize SGWT object with data and parameters

runSpecGraph

Build graph and compute eigendecomposition

runSGWT

Perform forward and inverse SGWT transforms

runSGCC

Calculate weighted similarity between signals

sgwt_forward

Forward SGWT transform

sgwt_inverse

Inverse SGWT transform

sgwt_energy_analysis

Energy distribution analysis

plot_sgwt_decomposition

Visualization of SGWT components

demo_sgwt

Demonstration with synthetic data

Applications

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

Author

BioGSP Development Team

Details

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

References

Hammond, D. K., Vandergheynst, P., & Gribonval, R. (2011). Wavelets on graphs via spectral graph theory. Applied and Computational Harmonic Analysis, 30(2), 129-150.

See Also

Examples

Run this code
# \donttest{
# 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)
# }

Run the code above in your browser using DataLab