create_codon_table: Create custom codon table from amino acid-codon mapping

create_codon_tableR Documentation

Create custom codon table from amino acid-codon mapping

Description

create_codon_table generates a codon table from a user-defined data frame that maps codons to their corresponding amino acids. This function enables analysis of non-standard or artificial genetic codes not available in the NCBI genetic code collection.

Usage

create_codon_table(aa2codon)

Arguments

aa2codon

A data frame with two required columns:

  • amino_acid: Three-letter amino acid abbreviations (e.g., "Ala", "Arg")

  • codon: Corresponding three-nucleotide codon sequences

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

# View the example amino acid to codon mapping
head(aa2codon)

# Create a custom codon table
custom_table <- create_codon_table(aa2codon = aa2codon)
head(custom_table)


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