Compute G+C content

seq_stat_gc(x)

Arguments

x

a DNA or RNA

Value

A numeric vector of G+C proportions.

Details

Ambiguous characters (other than S and W) are ignored.

See also

Examples


x <- dna(c("ATGCAGA", "GGR-----","TTGCCTAGKTGAACC"))

seq_stat_gc(x)
#> [1] 0.4285714 1.0000000 0.5000000