Mirrors gc_content() exactly, including its ambiguity apportioning and its
GC/(A+C+G+T) denominator, but counts every base in a single compiled
pass per sequence (cpp_base_counts()) instead of splitting each
sequence into a character vector with s2c() and scanning it five
times. The apportioning arithmetic stays here, vectorised over the count
matrix, so the published formula remains the readable one.
.gc_vec(input_seq, ambiguous = FALSE)Numeric vector of GC percentages, NA where a sequence is
NA or contains no countable base.
Character vector of sequences.
Logical; apportion ambiguous IUPAC codes as gc_content() does.