get_gc
calculates the overall GC content (percentage of guanine and
cytosine nucleotides) for each coding sequence.
Arguments
- cf
A matrix of codon frequencies as calculated by
count_codons()
. Rows represent sequences and columns represent codons.
Value
A named numeric vector of GC content values (ranging from 0 to 1). Names correspond to sequence identifiers from the input matrix.
Examples
# Calculate GC content for yeast genes
cf_all <- count_codons(yeast_cds)
gc <- get_gc(cf_all)
head(gc)
#> YPL071C YLL050C YMR172W YOR185C YLL032C YBR225W
#> 0.3566879 0.3981481 0.4101852 0.4027149 0.3454399 0.3880873
hist(gc, main = "Distribution of GC content")