Learn R Programming

cubar (version 1.2.0)

get_codon_table: Retrieve codon table by NCBI genetic code ID

Description

get_codon_table creates a standardized codon table based on genetic codes cataloged by NCBI. This function provides the mapping between codons and amino acids for different organisms and organelles, which is essential for accurate codon usage analysis.

Usage

get_codon_table(gcid = "1")

Value

A data.table with four columns:

  • aa_code: Single-letter amino acid code

  • amino_acid: Three-letter amino acid abbreviation

  • codon: Three-nucleotide codon sequence

  • subfam: Codon subfamily identifier (amino_acid_XY format)

Arguments

gcid

A character string specifying the NCBI genetic code ID. Use show_codon_tables() to view all available genetic codes and their corresponding IDs. Default is "1" (standard genetic code).

Examples

Run this code
# Standard genetic code (used by most organisms)
standard_code <- get_codon_table()
head(standard_code)

# Vertebrate mitochondrial genetic code
mito_code <- get_codon_table(gcid = '2')
head(mito_code)

Run the code above in your browser using DataLab