get_gc: Calculate GC content of coding sequences

View source: R/gene_index.R

get_gcR Documentation

Calculate GC content of coding sequences

Description

get_gc calculates the overall GC content (percentage of guanine and cytosine nucleotides) for each coding sequence.

Usage

get_gc(cf)

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)
hist(gc, main = "Distribution of GC content")


cubar documentation built on Aug. 21, 2025, 5:40 p.m.