count_codons: Count codon frequencies in coding sequences
Description
count_codons tabulates the frequency of all 64 possible codons across
input coding sequences. This function provides the foundation for most codon
usage bias analyses in the cubar package.
Usage
count_codons(seqs, ...)
Value
A matrix where rows represent individual CDS sequences and columns
represent the 64 possible codons. Each cell contains the frequency count
of the corresponding codon in the respective sequence.
Arguments
seqs
Coding sequences as a DNAStringSet object, or compatible input
that can be coerced to DNAStringSet.
...
Additional arguments passed to Biostrings::trinucleotideFrequency.
# Count codon frequencies across all yeast CDS sequencescf_all <- count_codons(yeast_cds)
dim(cf_all)
cf_all[1:5, 1:5]
# Count codons for a single sequencecount_codons(yeast_cds[1])