maftools icon indicating copy to clipboard operation
maftools copied to clipboard

Add per sample mutational signature functionality

Open jharenza opened this issue 6 years ago • 7 comments

Integrate deconstructSigs into package for investigation of mutational signatures on a per-sample level.

jharenza avatar Jun 01 '18 12:06 jharenza

Hi,

I would like to know whether this enhancement will be implemented soon?

Thanks, Axel

kunstner avatar Jan 21 '20 12:01 kunstner

Hi Axel, Sorry for the delay and not following it up. However, I do not have any immediate plans to include it as a dependency :|

PoisonAlien avatar Jan 21 '20 13:01 PoisonAlien

@kunstner Do you mean the signature exposure in each sample? If this is what you want, you can use {sigminer} package, which is compatible with {maftools}.

The current version of {sigminer} is under development, you have to install it from Github.

remotes::install_github("ShixiangWang/sigminer@V3")

An example:

library(maftools)
laml.maf = system.file('extdata', 'tcga_laml.maf.gz', package = 'maftools')
laml = read.maf(maf = laml.maf)

library(BSgenome.Hsapiens.UCSC.hg19, quietly = TRUE)
laml.tnm = trinucleotideMatrix(maf = laml, prefix = 'chr', add = TRUE, ref_genome = "BSgenome.Hsapiens.UCSC.hg19")
dim(laml.tnm$nmf_matrix)

library(NMF)
library(sigminer)

laml.sig = sig_extract(laml.tnm$nmf_matrix, n_sig = 3, pConstant = 1e-9)
get_sig_exposure(laml.sig)
get_sig_exposure(laml.sig, type = "relative")

ShixiangWang avatar Jan 21 '20 13:01 ShixiangWang

@ShixiangWang Thanks! That's what I was looking for. In the past, I iterated over all samples to perform the analysis but this seems way more elegant.

kunstner avatar Jan 22 '20 06:01 kunstner

@ShixiangWang One more thing. Is it possible to relate the found signatures to e.g. know COSMIC profiles?

kunstner avatar Jan 23 '20 11:01 kunstner

@kunstner Yep! You can use get_sig_similarity() function. It is modified from source code of maftools, you can run ?sigminer::get_sig_similarity in your R console to see the doc.

ShixiangWang avatar Jan 23 '20 12:01 ShixiangWang

Recently, I uploaded sigminer package v1.0 to CRAN, and the per-sample exposure quantification has been documented in https://shixiangwang.gitee.io/sigminer-doc/sigfit.html. I hope it is helpful for related issues.

ShixiangWang avatar Apr 28 '20 05:04 ShixiangWang