get_codon_table: Retrieve codon table by NCBI genetic code ID

View source: R/codon_info.R

get_codon_tableR Documentation

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")

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).

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)

Examples

# 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)


cubar documentation built on Aug. 21, 2025, 5:40 p.m.