Learn R Programming

cubar (version 1.1.0)

get_enc: Calculate ENC

Description

get_enc computes ENC of each CDS

Usage

get_enc(cf, codon_table = get_codon_table(), level = "subfam")

Value

vector of ENC values, sequence names are used as vector names

Arguments

cf

matrix of codon frequencies as calculated by count_codons().

codon_table

codon_table a table of genetic code derived from get_codon_table or create_codon_table.

level

"subfam" (default) or "amino_acid". For which level to determine ENC.

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.

Examples

Run this code
# estimate ENC of yeast genes
cf_all <- count_codons(yeast_cds)
enc <- get_enc(cf_all)
head(enc)
hist(enc)

Run the code above in your browser using DataLab