Bayesian NMF methods for mutational signature analysis & transcriptomic profiling on GPUs (Getz Lab).
Project description
SignatureAnalyzer
Automatic Relevance Determination (ARD) - NMF of mutational signature & expression data.
- See
docs
for a more in-depth description of how to use method.
Installation
Git Clone
git clone --recursive https://github.com/broadinstitute/getzlab-SignatureAnalyzer.git
cd getzlab-SignatureAnalyzer
pip install -e .
Note --recurisve
flag is required to clone submodules.
PIP
Support for PIP coming soon.
Source Publications
SignatureAnalyzer-GPU source publication
- Taylor-Weiner, A., Aguet, F., Haradhvala, N.J. et al. Scaling computational genomics to millions of individuals with GPUs. Genome Biol 20, 228 (2019) doi:10.1186/s13059-019-1836-7 (https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1836-7)
SignatureAnalyzer-CPU source publications
-
Kim, J. et al. Somatic ERCC2 mutations are associated with a distinct genomic signature in urothelial tumors. Nat. Genet. 48, 600–606 (2016). (https://www.nature.com/articles/ng.3557)
-
Kasar, S. et al. Whole-genome sequencing reveals activation-induced cytidine deaminase signatures during indolent chronic lymphocytic leukaemia evolution. Nat. Commun. 6, 8866 (2015). (https://www.nature.com/articles/ncomms9866)
Mathematical details
- Tan, V. Y. F., Edric, C. & Evotte, F. Automatic Relevance Determination in Nonnegative Matrix Factorization with the β-Divergence. (2012). (https://arxiv.org/pdf/1111.6085.pdf)
Command Line Interface
usage: siganalyzer [-h] -i INPUT [-t {maf,spectra,matrix}] [-n NRUNS]
[-o OUTDIR]
[--cosmic {cosmic2,cosmic3,cosmic3_exome,cosmic3_DBS,cosmic3_ID,cosmic3_TSB}]
[--hg_build {hg19,hg38,None}] [--cuda_int CUDA_INT]
[--verbose] [--K0 K0] [--max_iter MAX_ITER] [--del_ DEL_]
[--tolerance TOLERANCE] [--phi PHI] [--a A] [--b B]
[--objective {poisson,gaussian}] [--prior_on_W {L1,L2}]
[--prior_on_H {L1,L2}] [--report_freq REPORT_FREQ]
[--active_thresh ACTIVE_THRESH] [--cut_norm CUT_NORM]
[--cut_diff CUT_DIFF]
Example:
siganalyzer input.maf -n 10 --cosmic cosmic2 --objective poisson
Python API
import siganalyzer as sa
# ---------------------
# RUN SIGNATURE ANALYZER
# ---------------------
# Run array of decompositions with mutational signature processing
sa.run_maf(input.maf, outdir='./ardnmf_output/', cosmic='cosmic2', hg_build='hg19', nruns=10)
# Run ARD-NMF algorithm standalone
sa.ardnmf(...)
# ---------------------
# LOADING RESULTS
# ---------------------
import pandas as pd
H = pd.read_hdf('nmf_output.h5', 'H')
W = pd.read_hdf('nmf_output.h5', 'W')
Hraw = pd.read_hdf('nmf_output.h5', 'Hraw')
Wraw = pd.read_hdf('nmf_output.h5', 'Wraw')
feature_signatures = pd.read_hdf('nmf_output.h5', 'signatures')
markers = pd.read_hdf('nmf_output.h5', 'markers')
cosine = pd.read_hdf('nmf_output.h5', 'cosine')
log = pd.read_hdf('nmf_output.h5', 'log')
# Output for each run may be found at...
Hrun1 = pd.read_hdf('nmf_output.h5', 'run1/H')
Wrun1 = pd.read_hdf('nmf_output.h5', 'run1/W')
# etc...
# Aggregate output information for each run
aggr = pd.read_hdf('nmf_output.h5', 'aggr')
# ---------------------
# PLOTTING
# ---------------------
sa.pl.marker_heatmap(...)
sa.pl.signature_barplot(...)
sa.pl.stacked_bar(...)
sa.pl.k_dist(...)
sa.pl.consensus_matrix(...)
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
Built Distribution
File details
Details for the file signatureanalyzer-0.0.1.tar.gz
.
File metadata
- Download URL: signatureanalyzer-0.0.1.tar.gz
- Upload date:
- Size: 159.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a1f5e4a7880b503853c9e0e1642543e3fbf768a63b4de9497ac985bdce087e |
|
MD5 | c14c55b2b8a80b096ac5f6ce3e9224c7 |
|
BLAKE2b-256 | ac2575336bd0c3e30fb0c6f7eb90c3da2de09261ab427579fadaceafcd0c3a51 |
File details
Details for the file signatureanalyzer-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: signatureanalyzer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 168.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f0088a31736f47e6675f88a042141149f296329fc2aadc8e59ec65f3dc3a86 |
|
MD5 | 2436dd4f0e9a271385bcf5b4e80a86fa |
|
BLAKE2b-256 | 6c2a7c329f288bd9a708fd849117ce6b9217e33d2e8900271224bef8bb28bca0 |