Documentation: https://zaoqu-liu.github.io/SCORPION/
v1.2.2 (January 2026)
install.packages("SCORPION", repos = "https://zaoqu-liu.r-universe.dev")
SCORPION (Single-Cell Oriented Reconstruction of PANDA Individually Optimized Gene Regulatory Networks) is a computational framework for inferring cell-type-specific gene regulatory networks (GRNs) from single-cell RNA sequencing (scRNA-seq) data.
Single-cell transcriptomics has revolutionized our understanding of cellular heterogeneity, yet the inherent sparsity and technical noise in scRNA-seq data pose significant challenges for accurate gene regulatory network inference. SCORPION addresses these limitations through a metacell-based coarse-graining strategy that preserves biological signal while reducing technical artifacts.
SCORPION integrates three complementary data modalities to reconstruct transcriptome-wide GRNs:
The algorithm employs the PANDA (Passing Attributes between Networks for Data Assimilation) message-passing framework, which iteratively refines network edge weights through Tanimoto similarity-based updates until convergence.

install.packages("SCORPION", repos = "https://zaoqu-liu.r-universe.dev")
install.packages("SCORPION")
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_github("Zaoqu-Liu/SCORPION")
library(SCORPION)
# Load example data
data(scorpionTest)
# Infer gene regulatory network
grn <- scorpion(
tfMotifs = scorpionTest$tf, # TF-target motif prior
gexMatrix = scorpionTest$gex, # Gene expression matrix (genes × cells)
ppiNet = scorpionTest$ppi, # Protein-protein interactions
alphaValue = 0.1 # Learning rate (default)
)
| Parameter | Description | Format |
|---|---|---|
tfMotifs |
TF-target regulatory prior | data.frame with columns: TF, Target, Score |
gexMatrix |
Gene expression matrix | matrix/dgCMatrix (genes × cells) |
ppiNet |
Protein-protein interactions | data.frame with columns: TF1, TF2, Score |
SCORPION returns a list containing:
| Component | Description | Dimensions |
|---|---|---|
regNet |
TF-gene regulatory network | TFs × Genes |
coregNet |
Gene co-regulatory network | Genes × Genes |
coopNet |
TF cooperative network | TFs × TFs |
Edge weights represent Z-scores indicating the strength of regulatory relationships.
# Load package and data
library(SCORPION)
data(scorpionTest)
# Run SCORPION
result <- scorpion(
tfMotifs = scorpionTest$tf,
gexMatrix = scorpionTest$gex,
ppiNet = scorpionTest$ppi,
gammaValue = 10, # Metacell graining level
nPC = 25, # Principal components for clustering
alphaValue = 0.1, # Learning rate
hammingValue = 0.001 # Convergence threshold
)
# Examine output
dim(result$regNet) # Regulatory network dimensions
# [1] 783 214
# Extract top regulatory edges
regNet <- result$regNet
top_edges <- which(abs(regNet) > 2, arr.ind = TRUE)
| Parameter | Default | Description |
|---|---|---|
gammaValue |
10 | Ratio of cells to metacells |
nPC |
25 | Number of principal components for kNN graph |
alphaValue |
0.1 | Learning rate for network updates |
hammingValue |
0.001 | Convergence threshold |
assocMethod |
"pearson" | Association method ("pearson", "spearman", "pcNet") |
SCORPION v1.2.2 includes significant performance optimizations through RcppArmadillo and BLAS acceleration.
| Metric | Before Optimization | After Optimization | Speedup |
|---|---|---|---|
| Test data (230 genes × 80 cells) | ~10 sec | ~4 sec | 2.5x |
| 1000×1000 matrix multiplication | ~230 ms | 11 ms | 21x |
| Tanimoto similarity computation | ~230 ms | 19 ms | 12x |
| Feature | Description |
|---|---|
| RcppArmadillo | Core Tanimoto algorithm implemented in C++ |
| BLAS Acceleration | Leverages system-optimized BLAS (OpenBLAS, Apple Accelerate, MKL) |
| Vectorization | All R operations use vectorized implementations |
| Sparse Matrix | Native support for sparse matrices via Matrix package |
For optimal performance on macOS, enable Apple's vecLib BLAS:
cd /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib
sudo ln -sf libRblas.vecLib.dylib libRblas.dylib
# Ubuntu/Debian
sudo apt-get install libopenblas-dev
sudo update-alternatives --config libblas.so.3
| Data Size | Cells | Genes | Approximate Time |
|---|---|---|---|
| Small | 1,000 | 2,000 | ~5 sec |
| Medium | 10,000 | 5,000 | ~1-2 min |
| Large | 50,000 | 10,000 | ~5-10 min |
Times measured with optimized BLAS on Apple M2.
If you use SCORPION in your research, please cite:
Osorio, D., Capasso, A., Eckhardt, S. G., Giri, U., Somma, A., Pitts, T. M., ... & Kuijjer, M. L. (2023). Population-level comparisons of gene regulatory networks modeled on high-throughput single-cell transcriptomics data. Nature Computational Science. DOI: 10.1038/s43588-023-00558-w
We welcome contributions! Please submit issues and pull requests on GitHub.
GPL-3 © Zaoqu Liu