Description Usage Arguments Value Author(s) References See Also Examples
View source: R/plotExplainedVariance.R
'plotExplainedVariance()' plots the explained variance of a single tumor
genome's mutation patterns as a function of the number of signatures
(increasing subsets of signatures) used for decomposition. For each
number K of signatures, the highest variance explained by possible
subsets of K signatures will be plotted (full or greedy search, see below).
This can help to evaluate what minimum threshold for the explained variance
can be used to decompose tumor genomes with the function
decomposeTumorGenomes
.
1 2 | plotExplainedVariance(genome, signatures, minExplainedVariance=NULL,
minNumSignatures=2, maxNumSignatures=NULL, greedySearch=FALSE)
|
genome |
(Mandatory) The mutation load of a single genome in
Alexandrov- of Shiraishi-format, i.e. as vector or matrix. The format
must be the same as the one used for the |
signatures |
(Mandatory) The list of signatures (vectors, data frames or matrices) which are to be evaluated. Each of the list objects represents one mutational signature. Vectors are used for Alexandrov signatures, data frames or matrices for Shiraishi signatures. |
minExplainedVariance |
(Optional) If a numeric value between 0 and 1
is specified, the plot highlights the smallest subset of signatures which
is sufficient to explain at least the specified fraction of the variance
of the genome's mutation patterns. If, for example,
|
minNumSignatures |
(Optional) The plot will be generated only for
K>= |
maxNumSignatures |
(Optional) The plot will be generated only for
K<= |
greedySearch |
(Optional) If |
Returns (or draws) a plot of the explained variance as a function of the number of signatures.
Rosario M. Piro
Politecnico di Milano
Maintainer: Rosario
M. Piro
E-Mail: <rmpiro@gmail.com> or <rosariomichael.piro@polimi.it>
http://rmpiro.net/decompTumor2Sig/
Krueger, Piro (2019) decompTumor2Sig: Identification of mutational
signatures active in individual tumors. BMC Bioinformatics
20(Suppl 4):152.
decompTumor2Sig
decomposeTumorGenomes
computeExplainedVariance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ### get 15 pre-processed Shiraishi signatures computed (object 'signatures')
### from 435 tumor genomes Alexandrov et al (PMID: 23945592)
### using the pmsignature package
sfile <- system.file("extdata",
"Alexandrov_PMID_23945592_435_tumors-pmsignature-15sig.Rdata",
package="decompTumor2Sig")
load(sfile)
### load preprocessed breast cancer genomes (object 'genomes') from
### Nik-Zainal et al (PMID: 22608084)
gfile <- system.file("extdata",
"Nik-Zainal_PMID_22608084-genomes-Shiraishi_5bases_trDir.Rdata",
package="decompTumor2Sig")
load(gfile)
### plot the explained variance for 2 to 6 signatures of the first genome
plotExplainedVariance(genomes[[1]], signatures,
minExplainedVariance=0.98, minNumSignatures=2, maxNumSignatures=6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.