AnnData wrapper of the ARD-NMF module from SignatureAnalyzer-GPU.
Install using pip
pip install ann_nmf
Alternatively, install the development version:
git clone https://github.com/mvinyard/ann_nmf.git; cd ann_nmf;
pip install -e .
import ann_nmf
import scanpy as sc
adata = sc.datasets.pbmc3k()
ann_nmf.ut.preprocess_raw_counts(adata)
nmf = ann_nmf.NMF(adata, outdir="nmf_results/pbmc3k") # saves .h5 file
nmf.run(n_runs=10, K0=20, max_iter=2000)
nmf.cluster()
nmf.signatures()
nmf.plot_umap_signatures(adata)
ann_nmf.ut.fetch_signature(nmf.nmf_genes, 1)