get_enc | R Documentation |
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.
get_enc(cf, codon_table = get_codon_table(), level = "subfam")
cf |
A matrix of codon frequencies as calculated by |
codon_table |
A codon table defining the genetic code, derived from
|
level |
Character string specifying the analysis level: "subfam" (default, analyzes codon subfamilies) or "amino_acid" (analyzes at amino acid level). |
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).
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.
# Calculate ENC for yeast genes
cf_all <- count_codons(yeast_cds)
enc <- get_enc(cf_all)
head(enc)
hist(enc, main = "Distribution of ENC values")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.