hdWGCNA

High dimensional weighted gene co-expression network analysis

376
35
R

high dimensional WGCNA

R
ISSUES
Publication
Lifecycle:Maturing
Stars

hdWGCNA is an R package for performing weighted gene co-expression network analysis (WGCNA) in high dimensional transcriptomics data such as single-cell RNA-seq or spatial transcriptomics. hdWGCNA is highly modular and can construct context-specific co-expression networks across cellular and spatial hierarchies. hdWGNCA identifies modules of highly co-expressed genes and provides context for these modules via statistical testing and biological knowledge sources. hdWGCNA uses datasets formatted as Seurat objects. Check out the hdWGCNA in single-cell data tutorial or the hdWGCNA in spatial transcriptomics data tutorial to get started.

New functionality: hdWGCNA is now able to perform Transcription Factor Regulatory Network Analysis. This functionality was introduced in our publication Childs & Morabito et al., Cell Reports (2024).

If you use hdWGCNA in your research, please cite the manuscript describing hdWGCNA in addition to the original WGCNA publication:

Installation

We recommend creating an R conda environment environment for hdWGCNA.

# create new conda environment for R
conda create -n hdWGCNA -c conda-forge r-base r-essentials

# activate conda environment
conda activate hdWGCNA

Next open R and install the required dependencies:

  • Bioconductor, an R-based software ecosystem for bioinformatics and biostatistics.
  • devtools, a package for package development in R.
  • Seurat, a general-purpose toolkit for single-cell data science.
# install BiocManager
install.packages("BiocManager")

# install Bioconductor core packages
BiocManager::install()

# install devtools
BiocManager::install("devtools")

# install additional packages
BiocManager::install(c("WGCNA", "UCell", "GenomicRanges", "GeneOverlap"))

# install latest version of Seurat from CRAN
install.packages("Seurat")

# alternatively, install Seurat v4
install.packages("Seurat", repos = c("https://satijalab.r-universe.dev', 'https://cloud.r-project.org"))

Now you can install the hdWGCNA package using devtools.

devtools::install_github('smorabit/hdWGCNA', ref='dev')
Troubleshooting the installation

If you have trouble installing some of the dependencies, we advise trying to install them using alternative sources. For example, if you try to install the package using Bioconductor or CRAN, try instead with conda. Let’s say you have trouble installing devtools, try instead to use conda:

conda install conda-forge::r-devtools

For specific problems, please write a GitHub issue and we will try to help you.

Suggested Reading

To learn more about the method and to see several examples of analyzing different datasets, please check out the paper describing hdWGCNA (Morabito et al 2023). We also suggest our follow-up paper introducing transcription factor regulatory network analysis with hdWGCNA (Childs & Morabito et al 2024).

For additional reading, we suggest the original WGCNA publication and papers describing relevant algorithms for co-expression network analysis.

Note about package development: hdWGCNA is under active development, so you may run into errors and small typos. We welcome users to write GitHub issues to report bugs, ask for help, and to request potential enhancements.