Learn R Programming

cubar (version 1.2.0)

create_codon_table: 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)

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

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

Examples

Run this code
# 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)

Run the code above in your browser using DataLab