mapCodon: Map codons for each amino acid for a given protein.

Description Usage Arguments Value Examples

View source: R/genetic_code_sav.R

Description

Map codons for each amino acid for a given protein.

Usage

1
mapCodon(prot_id, ensembldbObj, genomeObj, seqLevelStyle = "NCBI")

Arguments

prot_id

character, Ensembl protein ID

ensembldbObj

Ensembl DB Object from the EnsDb package (see example)

genomeObj

Bioconductor genome object from which coding sequences are extracted (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 four columns: AA_pos: integer, amino acid position of the given Ensembl protein AA: amino acid (one-letter code) codon: codon corresponding to AA exon: the exon(s) in which the given AA can be found. Amino acids which span across exons are denoted as a semicolon-separated triplets of exon IDs, with each entry corresponding to each position of the codon.

Examples

1
2
3
4
5
6
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")

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