gccount2: Count bases in sequence (using Rcpp)

View source: R/functions.R

gccount2R Documentation

Count bases in sequence (using Rcpp)

Description

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

Usage

gccount2(inseq)

Arguments

inseq

a DNA sequence string.

Details

This function calls a C primitive

Value

A numeric of length 4

Author(s)

Robert Stojnic rs550@cam.ac.uk

Examples

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

lgatto/sequences documentation built on Feb. 27, 2024, 11:11 p.m.