/hdWGCNA

High dimensional weighted gene co-expression network analysis

Primary LanguageROtherNOASSERTION

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 co-expression networks across multi-scale cellular and spatial hierarchies. hdWGNCA identifies robust modules of inerconnected genes, and provides context for these modules through various biological knowledge sources. hdWGCNA requires data formatted as Seurat objects, one of the most ubiquitous formats for single-cell data. Check out the hdWGCNA in single-cell data tutorial or the hdWGCNA in spatial transcriptomics data tutorial to get started.

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.

Note about Seurat v5: We plan to test the compatibility of hdWGCNA with Seurat version 5, but we have currently not updated hdWGCNA to work with Seurat v5. We strongly suggest using Seurat v4 at this time, or use v5 at your own risk.

If you use hdWGCNA in your research, please cite the following papers 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 up R and install the required dependencies:

  • Bioconductor, an R-based software ecosystem for bioinformatics and biostatistics.
  • Seurat, a general-purpose toolkit for single-cell data science. We do not recommend using hdWGCNA with Seurat v5 at this time.
  • WGCNA, a package for co-expression network analysis.
  • igraph, a package for general network analysis and visualization.
  • devtools, a package for package development in R.
# install BiocManager
install.packages("BiocManager")

# install Bioconductor core packages
BiocManager::install()

# install additional packages:
BiocManager::install(c("WGCNA", "igraph", "devtools", "GeneOverlap", 'ggrepel'))
devtools::install_github("NightingaleHealth/ggforestplot")

# install Seurat v4, hdWGCNA currently does not work with Seurat v5
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')

Suggested Reading

Check out the paper describing hdWGCNA, and our original description of applying WGCNA to single-nucleus RNA-seq data:

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