High-Dimensional Weighted Gene Co-expression Network Analysis
📖 Documentation: https://zaoqu-liu.github.io/hdWGCNA/
Overview
hdWGCNA is a comprehensive R package for performing weighted gene co-expression network analysis (WGCNA) in high-dimensional transcriptomics data, including single-cell RNA sequencing (scRNA-seq) and spatial transcriptomics (ST) datasets.
The package implements a metacell aggregation strategy to address the inherent sparsity of single-cell data, enabling robust construction of gene co-expression networks. hdWGCNA is designed with a modular architecture that facilitates context-specific network analysis across cellular and spatial hierarchies.
Key Features
| Feature | Description |
|---|---|
| 🧬 Metacell Aggregation | Addresses single-cell data sparsity through intelligent cell grouping |
| 🔗 Modular Networks | Identifies co-expressed gene modules via hierarchical clustering |
| 📊 Module Eigengenes | Computes representative expression signatures for each module |
| 🎯 TF Network Analysis | Infers regulatory relationships using XGBoost modeling |
| 🔬 Module Preservation | Assesses reproducibility across independent datasets |
| 🔧 Seurat Integration | Native support for Seurat v4 and v5 objects |
Installation
From R-universe (Recommended)
install.packages("hdWGCNA", repos = "https://zaoqu-liu.r-universe.dev")From GitHub
# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
# Install hdWGCNA
devtools::install_github("Zaoqu-Liu/hdWGCNA")Quick Start
library(hdWGCNA)
library(Seurat)
# 1. Setup hdWGCNA experiment
seurat_obj <- SetupForWGCNA(seurat_obj, wgcna_name = "tutorial")
# 2. Construct metacells
seurat_obj <- MetacellsByGroups(seurat_obj, group.by = "cell_type")
seurat_obj <- NormalizeMetacells(seurat_obj)
# 3. Set expression matrix
seurat_obj <- SetDatExpr(seurat_obj, group_name = "INH", group.by = "cell_type")
# 4. Test soft power threshold
seurat_obj <- TestSoftPowers(seurat_obj)
# 5. Construct network
seurat_obj <- ConstructNetwork(seurat_obj)
# 6. Compute module eigengenes
seurat_obj <- ModuleEigengenes(seurat_obj)
seurat_obj <- ModuleConnectivity(seurat_obj)Documentation
Comprehensive tutorials are available at https://zaoqu-liu.github.io/hdWGCNA/:
Citation
If you use hdWGCNA in your research, please cite:
Morabito S, Reese F, Rahimzadeh N, Miyoshi E, Swarup V. hdWGCNA identifies co-expression networks in high-dimensional transcriptomics data. Cell Reports Methods (2023). DOI: 10.1016/j.crmeth.2023.100498
For transcription factor network analysis:
Childs JE, Morabito S, et al. Relapse to cocaine seeking is regulated by medial habenula NR4A2/NURR1 in mice. Cell Reports (2024). DOI: 10.1016/j.celrep.2024.113956
Related Publications
- Langfelder P, Horvath S. WGCNA: an R package for weighted correlation network analysis. BMC Bioinformatics (2008).
- Langfelder P, et al. Is My Network Module Preserved and Reproducible?. PLoS Computational Biology (2011).
Contributing
We welcome contributions! Please submit issues for bug reports or feature requests.
