gccount2: Count bases in sequence (using Rcpp)

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

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

Usage

1
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 [email protected]

Examples

1
2
3
4
s <- "AAAACCCGGT"
cnt <- gccount2(s)
cnt
stopifnot(cnt==table(strsplit(s,"")))

Example output

Loading required package: Rcpp
This is package 'sequences'

[1] 4 3 2 1

sequences documentation built on May 29, 2017, 8:18 p.m.