context2spec: Construct the spectrum from a mutation file with context

View source: R/preprocess.R

context2specR Documentation

Construct the spectrum from a mutation file with context

Description

The function converts mutation with reference contexts into a spectrum, which has mutation counts catalogued by contexts. It uses the fact that DNA has two complementary strands and folds the A/G mutations into to T/C.

Usage

context2spec(input_muts, plot = TRUE, normalize = "none")

Arguments

input_muts

A matrix of three columns; the first one is the context, with the central nucleotide mutated. The second one has the alternative nucleotide. The third column stores the names of the samples. If it only has two columns, the function assumes all mutations are from one single sample

plot

a binary indicator whethere a plot of the specturm will be made (default: TRUE)

normalize

Normalization choice ("none", "genome", "exome"). In general, when fitting COSMIC signatures, which are derived from a mixture of WGS and WES smaples, we do not think there is additional benefits with normalization (default: none) Normalization uses the trinucleotides frequencies in the genome. Please do not use normalized frequencies for futher fitting (siglasso()) as it the mutation counts are no longer discrete. siglass() has an option for such normalization, operating on the signatures.

Value

Returns a matrix of mutation counts in different context, in each of the samples


gersteinlab/siglasso documentation built on Sept. 5, 2022, 8:45 p.m.