get_enc: Calculate effective number of codons (ENC)
Description
get_enc computes the effective number of codons (ENC) for each coding
sequence, which quantifies the degree of codon usage bias. Lower ENC values
indicate stronger bias (fewer codons are used), while higher values indicate
more uniform codon usage.
A named numeric vector of ENC values. Names correspond to sequence
identifiers from the input matrix. ENC values typically range from 20
(maximum bias) to 61 (uniform usage).
Arguments
cf
A matrix of codon frequencies as calculated by count_codons().
Rows represent sequences and columns represent codons.
codon_table
A codon table defining the genetic code, derived from
get_codon_table() or create_codon_table().
level
Character string specifying the analysis level: "subfam" (default,
analyzes codon subfamilies) or "amino_acid" (analyzes at amino acid level).
References
Wright F. 1990. The 'effective number of codons' used in a gene. Gene 87:23-29.
Sun X, Yang Q, Xia X. 2013. An improved implementation of effective number of codons (NC). Mol Biol Evol 30:191-196.