| .gc_vec | R Documentation |
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)
input_seq |
Character vector of sequences. |
ambiguous |
Logical; apportion ambiguous IUPAC codes as |
Numeric vector of GC percentages, NA where a sequence is
NA or contains no countable base.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.