This repository can be used to produce the results for the paper entitled 'Analyzing Single Cell RNA Sequencing with Topological Nonnegative Matrix Factorization', published in the Journal of Computational and Applied Mathematics. https://doi.org/10.1016/j.cam.2024.115842
- numpy,scikit-learn, scipy
- wget to download the data
- The updating scheme only uses basic matrix multiplication, so any recent version should be ok.
pip install numpy scikit-learn wget scipy
- main_tnmf.py
- Computes the topological nonnegative matrix factorization
- --data [DATA NAME]
- --method [METHOD]
- choose between krTNMF, rTNMF, kTNMF, TNMF. Refer to Table 1 of the paper for the abbreviation
- --n_neighbors [N_NEIGBORS]
- Number of neighbors to consider for the cutoff based filtration. Default is 8
- --weights [WEIGHTS]
- The weights associated to each filtration. Input a list, such as 1,0,1,0,1,0,1,0.
- The weights will be normalized to 1 in the code
- --l [LAMBDA]
- Hyperparameter for GNMF and rGNMF. lambda = 10^l. Default is 0
- For krTNMF
python main_tnmf.py --data GSE75748time --method krTNMF --weights 1,0,1,0,1,0,1,1 --l 0
- For rTNMF
python main_tnmf.py --data GSE75748time --method rTNMF --weights 1,0,1,0,1,0,1,1 --n_neighbors 8 --l 0
- For kTNMF
python main_tnmf.py --data GSE75748time --method kTNMF --weights 1,0,1,0,1,0,1,1 --l 0
- For TNMF
python main_tnmf.py --data GSE75748time --method TNMF --weights 1,0,1,0,1,0,1,1 --n_neighbors 8 --l 0
- main_nmf_benchmark.py
- Computes the NMF, rNMF, GNMF and rGNMF for the given data.
- python main_nmf_benchmark.py --data [DATA NAME]
- The default is set to GSE75748time, but you can change it using the below example.
python main_nmf_benchmark.py --data GSE75748time
- main_nmf_benchmark.py
- computes NMF, rNMF, GNMF and rGNMF
- main_tnmf.py
- Computes the krTNMF, rTNMF, kTNMF, TNMF
- ./SingleCellDataProcess/
- Processed the scRNA-seq data
- ./initilization/
- Contains the nndsvda initialization, which was modified from sklearn's nndsvda
- ./algorithm/
- contains all the code
For any question, please contact hozumiyu@msu.edu
I will be moving to Georgia Institute of Technology starting next semster. Email will be updated.
@article{hozumi2024analyzing,
title={Analyzing single cell RNA sequencing with topological nonnegative matrix factorization},
author={Hozumi, Yuta and Wei, Guo-Wei},
journal={Journal of Computational and Applied Mathematics},
pages={115842},
year={2024},
publisher={Elsevier}
}
We also have a PCA implementation of our persistent Laplacian
@article{cottrell2023k,
title={K-Nearest-Neighbors Induced Topological PCA for Single Cell RNA-Sequence Data Analysis},
author={Cottrell, Sean and Hozumi, Yuta and Wei, Guo-Wei},
journal={ArXiv},
year={2023},
publisher={arXiv}
}