mapMutSig: Map mutations given a table of codons for each amino acid for...

Description Usage Arguments Value Examples

View source: R/genetic_code_sav.R

Description

Map mutations given a table of codons for each amino acid for a given protein.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mapMutSig(
  prot_id,
  prot_length,
  mutMap,
  ensembldbObj,
  genomeObj,
  flank = 1,
  contexts = get32Contexts(),
  seqLevelStyle = "NCBI"
)

Arguments

prot_id

character, Ensembl protein ID

prot_length

integer, length (in amino acids) of the given protein

mutMap

data.frame list of mutations obtained from mapMut

ensembldbObj

Ensembl DB Object from the EnsDb package (see example)

genomeObj

Bioconductor genome object from which coding sequences are extracted (see example)

flank

integer, the number of flanking nucleotides with which to define mutational signatures. Only the value of 1 has been catered for at the moment. (Default: 1)

contexts

character vector, all possible DNA motifs on which mutational signatures are defined. Obtained from get32Contexts() (see example)

seqLevelStyle

Either "UCSC" or "NCBI". Denote conventions used in genome object to name chromosomes. Need changing to match the genome object. (Default: "NCBI")

Value

A data.frame with eight columns: chr: chromosome g_pos: genomic position AA_pos: integer, amino acid position of the given Ensembl protein WT_AA: wild-type amino acid (one-letter code) MUT_AA: mutant amino acid (one-letter code) WT_codon: codon corresponding to wild-type amino acid MUT_codon: codon corresponding to mutant amino acid MutSig: the corresponding mutational signature (96-contexts) corresponding to the given AA substitution

Examples

1
2
3
4
5
6
7
8
9
require(EnsDb.Hsapiens.v75)
require(BSgenome.Hsapiens.UCSC.hg19)
id <- "ENSP00000233146"
codons <- mapCodon(id, EnsDb.Hsapiens.v75::EnsDb.Hsapiens.v75,
                   BSgenome.Hsapiens.UCSC.hg19::Hsapiens, seqLevelStyle = "UCSC")
codons_muts <- mapMut(codons, getPossibleMissenseSNVs())
codons_mutsigs <- mapMutSig(id, nrow(codons), codons_muts,
                            EnsDb.Hsapiens.v75::EnsDb.Hsapiens.v75,
                            BSgenome.Hsapiens.UCSC.hg19::Hsapiens, seqLevelStyle = "UCSC")

josef0731/CDSMutSig documentation built on Dec. 21, 2021, 2:19 a.m.