G+C Content {seqinr} | R Documentation

## Calculates the fractional G+C content of nucleic acid sequences

### Description

Calculates the fraction of G+C bases of the input nucleic acid sequence(s). It reads in nucleic acid sequences, sums the number of 'G' and 'C' bases and writes out the result as the fraction (in the interval 0.0 to 1.0) of the length of the whole sequence. Global G+C content `GC`, G+C in the first position of the codon bases `GC1`, G+C in the second position of the codon bases `GC2`, and G+C in the third position of the codon bases `GC3` can be computed.

### Usage

    GC(seq)
    GC1(seq)
    GC2(seq)
    GC3(seq)

### Arguments

`seq` | any nucleic acid sequence

### Value

`GC` returns the fraction of G+C as a numeric vector, `GC1` returns the fraction of G+C at first codon position as a numeric vector, `GC2` returns the fraction of G+C at second codon position as a numeric vector, `GC3` returns the fraction of G+C at third codon position as a numeric vector.

### Author(s)

D. Charif and L. Palmeira

### References

`citation("seqinr")`

### Examples

       s=s2c("agtctggggggccccttttaagtagatagatagctagtcgta")
       GC(s)
       GC1(s)
       GC2(s)
       GC3(s)

[Package seqinr version 1.0-4 Index]