build_catalogues: Build mutational catalogues

Description Usage Arguments Value Examples

View source: R/sigfit_utility.R

Description

build_catalogues generates a set of mutational catalogues from a table containing the base change and trinucleotide context of each single-nucleotide variant in every sample.

Usage

1
build_catalogues(variants)

Arguments

variants

Character matrix or data frame, with one row per single-nucleotide variant and four/five columns:

  • Sample ID (character, e.g. "Sample 1").

  • Reference allele (character: "A", "C", "G", or "T").

  • Alternate allele (character: "A", "C", "G", or "T").

  • Trinucleotide context of the variant (character; the reference sequence between the positions immediately before and after the variant; e.g. "TCA").

  • Optional: transcriptional strand of the variant (character/numeric: 1 or "1" or "U" for untranscribed; -1 or "-1" or "T" for transcribed). If this column is included, a transcriptional strand-wise representation of catalogues will be used.

Value

An integer matrix of mutation counts, where each row corresponds to a sample and each column corresponds to one of the 96 (or 192) mutation types.

Examples

1
2
3
4
5
6
7
# Load example mutation data
data("variants_21breast")
head(variants_21breast)

# Build catalogues
counts <- build_catalogues(variants_21breast)
counts

kgori/sigfit documentation built on Feb. 3, 2022, 12:04 p.m.