Learn R Programming

HELP (version 1.30.0)

calcGC: Calculate GC percent

Description

Function to calculate GC percent from a nucleotide sequence input

Usage

calcGC(x, ...)

Arguments

x
characters containing nucleotide sequence (ex: "ATCGGAA") or an object of class ExpressionSet
...
Other arguments passed to methods:
allow
vector of characters specifying what other characters to allow in sequence (default is "N")

Value

Returns a numerical value (from 0 to 1) indicating the C+G content of the sequence, corresponding to the fraction of (C+G)/(A+T+C+G...). A value of NA is returned if the function encounters an error that prevents proper calculation of GC percent.

See Also

calcGC-methods, calcTm

Examples

Run this code
#demo(pipeline,package="HELP")

calcGC("AAAACGCG")
calcGC(sequence="cXgXcXgXcXgX",allow="X")

Run the code above in your browser using DataLab