extractSignatures: Extract mutational signatures from trinucletide context.

Description Usage Arguments Details Value See Also Examples

View source: R/extractSignatures.R

Description

Decompose a matrix of 96 substitution classes into n signatures.

Usage

1
2
extractSignatures(mat, n = NULL, nTry = 6, plotBestFitRes = FALSE,
  parallel = NULL)

Arguments

mat

Input matrix of diemnsion nx96 generated by trinucleotideMatrix

n

decompose matrix into n signatures. Default NULL. Tries to predict best value for n by running NMF on a range of values and chooses based on cophenetic correlation coefficient.

nTry

tries upto this number of signatures before choosing best n. Default 6.

plotBestFitRes

plots consensus heatmap for range of values tried. Default FALSE

parallel

calls to .opt argument of nmf. e.g, 'P4' for using 4 cores. See note on nmf for MAC users.

Details

This function decomposes a non-negative matrix into n signatures. Extracted signatures are compared against 30 experimentally validated signatures by calculating cosine similarity. See http://cancer.sanger.ac.uk/cosmic/signatures for details.

Value

a list with decomposed scaled signatures, signature contributions in each sample and a cosine similarity table against validated signatures.

See Also

trinucleotideMatrix plotSignatures

Examples

1
2
3
4
5
6
## Not run: 
laml.tnm <- trinucleotideMatrix(maf = laml, ref_genome = 'hg19.fa', prefix = 'chr',
add = TRUE, useSyn = TRUE)
laml.sign <- extractSignatures(mat = laml.tnm, plotBestFitRes = FALSE)

## End(Not run)

maftools documentation built on May 25, 2017, 2:03 a.m.

Search within the maftools package
Search all R packages, documentation and source code