Learn R Programming

MassArray (version 1.24.0)

countCGs: Count number of CGs

Description

Function to count the number of CG dinucleotides in a given sequence (can include special characters for degenerate bases - i.e. 'Y' or 'R')

Usage

countCGs(sequence)

Arguments

sequence
Nucleotide sequence input as a character string

Value

Returns a numerical count of the number of CG dinucleotides in a given sequence, NA if sequence input is NA

Examples

Run this code
countCGs("AAACGCGAAAAAAAYGAAA")

Run the code above in your browser using DataLab