GC: Calculate G and C content of nucleotide sequences

GCR Documentation

Calculate G and C content of nucleotide sequences

Description

Calculate G and C content of nucleotide sequences. The number of G and C in sequence is divided by length of sequence(when totalnt is TRUE) or the number of all A,T,C,G and ambiguous base.

Usage

GC(ntseq, ambiguous = FALSE, totalnt = TRUE)

Arguments

ntseq

Sequence (5' to 3') of one strand of the nucleic acid duplex as string or vector of characters.

ambiguous

Ambiguous bases are taken into account to compute the G and C content when ambiguous is TRUE.

totalnt

Sum of 'G' and 'C' bases divided by the length of the sequence when totalnt is TRUE.

Value

Content of G and C(range from 0 to 100

Author(s)

Junhui Li

Examples


GC(c("a","t","c","t","g","g","g","c","c","a","g","t","a"))#53.84615
GC("GCATSWSYK",ambiguous = TRUE)#55.55556


TmCalculator documentation built on March 18, 2022, 6:10 p.m.