sciNMF is an R package designed for exploring the heterogeneity of cellular transcriptional states across individuals using single-cell RNA-seq data. This package is developed by HuangLab at the School of Life Sciences, Xiamen University, Xiamen, Fujian, China.
We have modified the method from Gavish A, et al. (Nature, 2023) to identify cellular transcriptional states using NMF on scRNA-seq data.
There are 3 main steps to identify cell states from scRNA-seq data:
Step 1: Perform multiple ranks Non-Negative Matrix Factorization (NMF) on single-cell gene expression matrices for each individual.
Step 2: Filter out low-quality programs by considering their Interquartile Range (IQR) and median usages. Identify robust programs based on their intra- and inter-sample reproducibility.
Step 3: Cluster the robust programs based on their overlapping gene numbers. Generate meta-programs from the clustering results, utilizing the top genes with the highest average weight to represent these meta-programs.
We recommend installing the main dependency packages with conda first to avoid version conflicts and installation failures. Please run the following commands in the terminal:
conda create -n sciNMF r-base -y
conda acivate sciNMF
conda install r-seurat bioconductor-clusterprofiler bioconductor-gsva -y
conda install bioconda::bioconductor-glmgampoi –y # for Seurat::SCTransform acceleration
To install the sciNMF package, you can run the following commands in R:
# Install devtools if not already installed
if(!requireNamespace("devtools", quietly = TRUE)){
install.packages("devtools")
}
devtools::install_github('Tang-RH/sciNMF')
Alternatively, you can download the release package and perform a local installation runing the following command in R:
devtools::install_local('the/path/to/package/sciNMF_0.1.2.tar.gz',repos = NULL, type = "source")
If there are too many version conflicts among dependent packages, causing the installation failure, we recommend manually installing the following three main dependent packages: Seurat
, clusterProfiler
, GSVA
To check if the package has been installed successfully, you can run the following commands in R:
library(sciNMF)
data("SrtObj")
ls_Demo_WH <- RunNMF(SrtObj, group.by = 'Sample')
For detailed instructions and examples, please refer to our comprehensive tutorial.https://github.com/Tang-RH/sciNMF/tree/master/Tutorial
You can directly download our GitHub repository and run the tutorial Jupyter notebook. Run the following commands in the terminal:
git clone https://github.com/Tang-RH/sciNMF.git
cd sciNMF
Please feel free to open an issue if you encounter any problems while using our package.
If you find sciNMF useful for your research, please consider citing our publication: Zhang Z, Tang R, Zhu M, et al. Deciphering cell states and the cellular ecosystem to improve risk stratification in acute myeloid leukemia. Brief Bioinform. 2024