Skip to content

bio-Pixel/SPARROT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

148 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPARROT

SPARROT (Spatial Proximity Analysis of Regional Relationships, Overlap, and Transcriptome)
A toolkit for analyzing and visualizing spatial colocalization and interactions in spatial transcriptomics data.


🐦 Installation

if (!require("devtools")) {
  install.packages("devtools")
}
devtools::install_github("bio-Pixel/SPARROT")

📦 Features

  • Seamlessly convert Seurat spatial objects to SparrotObj
  • Compute spatial overlap (Dice-Sørensen coefficient, Jaccard index, Matthews correlation coefficient) between genes and cell types
  • Permutation tests for colocalization significance
  • Quantify spatial proximity using nearest-neighbor distance metrics
  • Visualize multi-celltype spatial maps with transparency encoding

📘 Vignette

You can find a step-by-step usage example:

  1. Human Myocardial Infarction, 10x Visium
  2. Human Lymph Node, 10x Visium
  3. Human Pancreatic Ductal Adenocarcinoma, Stereo-seq

🧬 Example

library(SPARROT)

# Convert Seurat to SPARROT
sparobj <- convertSeuratToSparrot(seurat_obj, cell_prob = pred_matrix)

# Plot spatial probabilities
plotMultiCellTypeProb(sparobj, celltype = c("B", "Plasma"))

# Compute gene-celltype overlap
computeGeneCelltypeOverlap(sparobj, gene = "MZB1", celltype = "Plasma")

# Evaluate spatial co-localization
evaluate_overlap_metrics(bin1 = as.logical(sparobj@meta.data[, "bin_B"]),
                         bin2 = as.logical(sparobj@meta.data[, "bin_Plasma"]),
                         coords = sparobj@coords)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages