gccount: Count bases in sequence

View source: R/functions.R

gccountR Documentation

Count bases in sequence

Description

Returns the number of 'A', 'C', 'G' and 'T' bases in the 'inseq' sequence string.

Usage

gccount(inseq)

Arguments

inseq

a DNA sequence string.

Details

This function calls a C primitive

Value

A numeric of length 4

Author(s)

Laurent Gatto

Examples

s <- "AAAACCCGGT"
cnt <- gccount(s)
cnt
stopifnot(cnt == table(strsplit(s, "")))

lgatto/sequences documentation built on Dec. 2, 2024, 1:57 a.m.