Note: hdWGCNA is under active development, so you will likely run into errors if you choose to use hdWGCNA before its first stable release.
hdWGCNA, formerly known as scWGCNA, is an R package for performing weighted gene co-expression network analysis (WGCNA) in high dimensional data such as single-cell RNA-seq or spatial transcriptomics. hdWGCNA constructs co-expression networks in a cell-type-specific manner, identifies robust modules of inerconnected genes, and provides biological context for these modules. hdWGCNA is directly compatible with Seurat objects, one of the most ubiquitous formats for single-cell data. Check out the hdWGCNA basics tutorial to get started.
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.
- 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:
install.packages(c("Seurat", "WGCNA", "igraph", "devtools"))
Now you can install the hdWGCNA package using devtools
.
devtools::install_github('smorabit/hdWGCNA', ref='dev')