ann_nmf - AnnData wrapper of the ARD-NMF module from SignatureAnalyzer
Project description
AnnData wrapper of the ARD-NMF module from SignatureAnalyzer-GPU.
Installation
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 .
API overview
Import libraries and get some data
import ann_nmf
import scanpy as sc
adata = sc.datasets.pbmc3k()
ann_nmf.ut.preprocess_raw_counts(adata)
Key class:
nmf = ann_nmf.NMF(adata, outdir="nmf_results/pbmc3k") # saves .h5 file
nmf.run(n_runs=10, K0=20, max_iter=2000)
SignatureAnalyzer visualization:
nmf.cluster()
nmf.signatures()
Conceptual background and foundational work
Acknowledgements
- Most of the code to wrap SignatureAnalyzer in an AnnData-friendly API was borrowed directly (and shamelessly) from Shankara Anand (@shankara-a) with only slight refactoring for more flexibility with fewer dependencies on install.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ann_nmf-0.0.1.tar.gz
(10.2 kB
view hashes)
Built Distribution
ann_nmf-0.0.1-py3-none-any.whl
(13.0 kB
view hashes)