📖 Documentation: https://zaoqu-liu.github.io/FastCCCR/
FastCCCR is a high-performance R implementation of the FastCCC framework for cell-cell communication (CCC) inference in single-cell RNA sequencing (scRNA-seq) data. The package provides a rigorous statistical framework that computes exact null distributions via Fast Fourier Transform (FFT) convolution, integrates multiple statistical methodologies through Cauchy combination, and enables reference-based inference for rapid analysis of query datasets.
The FastCCCR analytical pipeline comprises five computational stages:
- Single-Unit Expression Quantification: Aggregation of gene expression across cells within each cluster using configurable summary statistics (mean, median, or arbitrary quantiles)
- Protein Complex Aggregation: Integration of multi-subunit protein complex expression via minimum or average aggregation functions
- Ligand-Receptor Score Computation: Combination of ligand and receptor expression scores using arithmetic or geometric mean
- Null Distribution Derivation: Exact computation of null distributions for cluster-level statistics using FFT-based convolution of single-cell PMFs
- Multi-Method Integration: Cauchy combination of p-values from multiple statistical configurations to enhance robustness
install.packages("FastCCCR", repos = "https://zaoqu-liu.r-universe.dev")# Install remotes if not available
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
# Install FastCCCR from GitHub
remotes::install_github("Zaoqu-Liu/FastCCCR")- R (≥ 4.1.0)
- C++ compiler with C++11 support (for Rcpp components)
| Category | Packages |
|---|---|
| Core | R6, Rcpp, RcppArmadillo, data.table, Matrix |
| Parallel Computing | future, future.apply, progressr |
| Visualization | ggplot2, igraph, ComplexHeatmap |
| Single-Cell | Seurat (≥ 4.0) |
library(FastCCCR)
library(Seurat)
# Load single-cell data
seurat_obj <- readRDS("your_data.rds")
# Execute FastCCC with Cauchy combination (recommended)
results <- fastccc_cauchy(
seurat_obj,
database = "CPDBv5.0.0",
celltype_col = "cell_type",
min_percentile = 0.1,
parallel = TRUE,
n_cores = 4
)
# Extract significant interactions
significant_interactions <- results$significant_interactions
head(significant_interactions)
# Visualization
plot_ccc_network(results)
plot_ccc_heatmap(results)# Analysis with specified statistical method
results <- statistical_analysis_method(
seurat_obj,
database = "CPDBv5.0.0",
celltype_col = "cell_type",
single_unit_summary = "Mean",
complex_aggregation = "Minimum",
LR_combination = "Arithmetic",
min_percentile = 0.1
)Reference-based inference enables rapid CCC analysis by leveraging pre-computed reference panels from atlas-scale datasets.
# Step 1: Construct reference panel from atlas data
build_reference(
seurat_obj = atlas_seurat,
reference_name = "tissue_atlas",
database = "CPDBv5.0.0",
celltype_col = "cell_type",
save_path = "./reference/"
)
# Step 2: Infer CCC in query dataset using reference
results <- infer_query(
seurat_obj = query_seurat,
reference_path = "./reference/tissue_atlas",
database = "CPDBv5.0.0",
celltype_col = "cell_type",
celltype_mapping = list(
"Reference_CellType1" = "Query_CellType1",
"Reference_CellType2" = "Query_CellType2"
)
)FastCCCR provides native support for multiple curated ligand-receptor interaction databases:
| Database | Version | Species | Interactions |
|---|---|---|---|
| CellPhoneDB | v4.1.0 | Human | ~1,000 |
| CellPhoneDB | v5.0.0 | Human | ~3,000 |
| CellChat | v1.6.1 | Human/Mouse | ~2,000 |
| NicheNet | v1.1.1 | Human | ~7,000 |
| NicheNet | v2.1.5 | Human | ~7,000 |
FastCCCR computes exact null distributions for cluster-level expression statistics by modeling each cell's expression as an independent sample from the gene-specific empirical distribution. The distribution of the cluster mean (or quantile) is obtained through FFT-based convolution:
where
Multiple p-values from different statistical configurations are combined using the Cauchy combination test:
This approach provides robust inference while controlling the false discovery rate.
- Vectorized Operations: Core computations leverage data.table and Matrix for efficient memory usage
- C++ Backend: FFT convolution implemented via RcppArmadillo for computational efficiency
- Parallel Processing: Native support for parallel computation via the future framework
- Memory Efficiency: Sparse matrix operations for large-scale datasets
If you utilize FastCCCR in your research, please cite:
@software{liu2026fastcccr,
author = {Liu, Zaoqu},
title = {FastCCCR: Fast Cell-Cell Communication Analysis with Statistical Framework},
year = {2026},
url = {https://github.com/Zaoqu-Liu/FastCCCR}
}This project is licensed under the MIT License. See the LICENSE file for details.
- Author: Zaoqu Liu
- Email: liuzaoqu@163.com
- GitHub: https://github.com/Zaoqu-Liu
- Issues: GitHub Issues