Skip to contents

Re-expresses SBS96 signatures relative to a different mutation opportunity vector (whole-genome vs whole-exome trinucleotide frequencies, or a custom vector): divide by the source opportunities, multiply by the target ones, re-normalize each column (the sigfit `convert_signatures` semantics). The bundled tables come from the COSMIC v2/v3 signature database (via sigfit/sigminer); custom opportunity vectors are accepted for panel targets.

Usage

ms_convert(signatures, from = "human-genome", to = "human-exome")

Arguments

signatures

A 96 x k numeric matrix with SBS96 registry rownames (columns sum to 1 after conversion), or an [MsSignature].

from

Source opportunity: `"human-genome"`, `"human-exome"`, or a numeric vector of 96 positive finite frequencies (named by the registry labels, or matching the signature rownames).

to

Target opportunity: same forms as `from`.

Value

A matrix of the converted signatures (or a new [MsSignature] for the MsSignature method, with the exposures untouched — exposure shares are opportunity-agnostic under this semantics).

References

  • Opportunity tables: COSMIC signature database v2/v3; sigfit `convert_signatures` (bioRxiv 2021 (doi:10.1101/372896)).