Skip to contents

create_codon_table creates codon table from data frame of aa to codon mapping.

Usage

create_codon_table(aa2codon)

Arguments

aa2codon

a data frame with two columns: amino_acid (Ala, Arg, etc.) and codon.

Value

a data.table with four columns: aa_code, amino_acid, codon, and subfam.

Examples

head(aa2codon)
#>   amino_acid codon
#> 1          *   TAA
#> 2          *   TAG
#> 3          *   TGA
#> 4        Ala   GCT
#> 5        Ala   GCC
#> 6        Ala   GCA
create_codon_table(aa2codon = aa2codon)
#>     aa_code amino_acid  codon subfam
#>      <char>     <char> <char> <char>
#>  1:       *          *    TAA   *_TA
#>  2:       *          *    TAG   *_TA
#>  3:       *          *    TGA   *_TG
#>  4:       A        Ala    GCT Ala_GC
#>  5:       A        Ala    GCC Ala_GC
#>  6:       A        Ala    GCA Ala_GC
#>  7:       A        Ala    GCG Ala_GC
#>  8:       R        Arg    CGT Arg_CG
#>  9:       R        Arg    CGC Arg_CG
#> 10:       R        Arg    CGA Arg_CG
#> 11:       R        Arg    CGG Arg_CG
#> 12:       R        Arg    AGA Arg_AG
#> 13:       R        Arg    AGG Arg_AG
#> 14:       N        Asn    AAT Asn_AA
#> 15:       N        Asn    AAC Asn_AA
#> 16:       D        Asp    GAT Asp_GA
#> 17:       D        Asp    GAC Asp_GA
#> 18:       C        Cys    TGT Cys_TG
#> 19:       C        Cys    TGC Cys_TG
#> 20:       Q        Gln    CAA Gln_CA
#> 21:       Q        Gln    CAG Gln_CA
#> 22:       E        Glu    GAA Glu_GA
#> 23:       E        Glu    GAG Glu_GA
#> 24:       G        Gly    GGT Gly_GG
#> 25:       G        Gly    GGC Gly_GG
#> 26:       G        Gly    GGA Gly_GG
#> 27:       G        Gly    GGG Gly_GG
#> 28:       H        His    CAT His_CA
#> 29:       H        His    CAC His_CA
#> 30:       I        Ile    ATT Ile_AT
#> 31:       I        Ile    ATC Ile_AT
#> 32:       I        Ile    ATA Ile_AT
#> 33:       L        Leu    TTA Leu_TT
#> 34:       L        Leu    TTG Leu_TT
#> 35:       L        Leu    CTT Leu_CT
#> 36:       L        Leu    CTC Leu_CT
#> 37:       L        Leu    CTA Leu_CT
#> 38:       L        Leu    CTG Leu_CT
#> 39:       K        Lys    AAA Lys_AA
#> 40:       K        Lys    AAG Lys_AA
#> 41:       M        Met    ATG Met_AT
#> 42:       F        Phe    TTT Phe_TT
#> 43:       F        Phe    TTC Phe_TT
#> 44:       P        Pro    CCT Pro_CC
#> 45:       P        Pro    CCC Pro_CC
#> 46:       P        Pro    CCA Pro_CC
#> 47:       P        Pro    CCG Pro_CC
#> 48:       S        Ser    TCT Ser_TC
#> 49:       S        Ser    TCC Ser_TC
#> 50:       S        Ser    TCA Ser_TC
#> 51:       S        Ser    TCG Ser_TC
#> 52:       S        Ser    AGT Ser_AG
#> 53:       S        Ser    AGC Ser_AG
#> 54:       T        Thr    ACT Thr_AC
#> 55:       T        Thr    ACC Thr_AC
#> 56:       T        Thr    ACA Thr_AC
#> 57:       T        Thr    ACG Thr_AC
#> 58:       W        Trp    TGG Trp_TG
#> 59:       Y        Tyr    TAT Tyr_TA
#> 60:       Y        Tyr    TAC Tyr_TA
#> 61:       V        Val    GTT Val_GT
#> 62:       V        Val    GTC Val_GT
#> 63:       V        Val    GTA Val_GT
#> 64:       V        Val    GTG Val_GT
#>     aa_code amino_acid  codon subfam