computeExplainedVariance {decompTumor2Sig} | R Documentation

## Compute the explained variance.

### Description

'computeExplainedVariance()' computes for one or more tumors the variance which is explained by the estimated contributions (exposures) of a set of signatures when compared to the observed genomes.

### Usage

    computeExplainedVariance(exposures, signatures, genomes)

### Arguments

`exposures` | (Mandatory) A single vector or list of vectors containing the estimated signature contributions/exposures as provided by the function `decomposeTumorGenomes`. A list of vectors is used if the explained variance shall be computed for multiple genomes. The number of exposure vectors must correspond to the number of `genomes`. The number of elements of each exposure vector must correspond to the number of `signatures`.
`signatures` | (Mandatory) The list of signatures (vectors, data frames or matrices) for which the exposures were obtained. Each of the list objects represents one mutational signature. Vectors are used for Alexandrov signatures, data frames or matrices for Shiraishi signatures.
`genomes` | (Mandatory) Can be either a vector, a data frame or a matrix (for an individual tumor genome), or a list of one of these object types (for multiple tumors). Each tumor genome must be of the same form as the `signatures`.

### Value

A numeric vector of explained variances, one for each genome.

### Author(s)

Rosario M. Piro
Freie Universitaet Berlin
Maintainer: Rosario M. Piro
E-Mail: <rmpiro@gmail.com> or <r.piro@fu-berlin.de>

### References

http://rmpiro.net/decompTumor2Sig/
Krueger, Piro (2018) decompTumor2Sig: Identification of mutational signatures active in individual tumors. BMC Bioinformatics (accepted for publication).
Krueger, Piro (2017) Identification of Mutational Signatures Active in Individual Tumors. NETTAB 2017 - Methods, Tools & Platforms for Personalized Medicine in the Big Data Era, October 16-18, 2017, Palermo, Italy. PeerJ Preprints 5:e3257v1, 2017.

### See Also

`decompTumor2Sig`
`decomposeTumorGenomes`
`plotExplainedVariance`

### Examples

    ### get Alexandrov signatures from COSMIC
    signatures <- readAlexandrovSignatures()

    ### load preprocessed breast cancer genomes (object 'genomes') from
    ### Nik-Zainal et al (PMID: 22608084)
    gfile <- system.file("extdata",
             "Nik-Zainal_PMID_22608084-genomes-Alexandrov_3bases.Rdata",
             package="decompTumor2Sig")
    load(gfile)

    ### compute exposures
    exposures <- decomposeTumorGenomes(genomes, signatures, verbose=FALSE)

    ### compute explained variance for the tumor genomes
    computeExplainedVariance(exposures, signatures, genomes)

[Package decompTumor2Sig version 2.0.0 Index]