Calculate Codon Adaptation Index

jamCai(x, codonDF, ...)

Arguments

x

character vector containing DNA or RNA sequence, intended to include amino acid codons in frame beginning with the first character. It is sent to dna2codon() which creates a character vector whose elements all contain three characters. The input x represents sequence data for one protein-coding transcript sequence.

codonDF

data.frame containing amino acid codons per row, with colname "codon" containing three-character codon sequences, and colname "multifreq" containing the relative frequency versus max of codon use per amino acid, as produced by codonUsage2df().

...

additional arguments are ignored.

Value

numeric vector with length length(x), named with names(x) containing codon adaptation index (cai) values equivalent to those produced by seqinr::cai().

Details

This function is equivalent to seqinr::cai() except that it runs in vectorized form and is markedly more efficient.

See also

Other jam codon usage functions: codonUsage2df(), dna2codon()