iupac: IUPAC Codes

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate the correct IUPAC code for a vector of nucleotides.

Usage

1
2
3
4
5
iupacCode(bases, ignore.gaps = FALSE)

validIupacCodes(bases)

iupacMat()

Arguments

bases

character vector containing valid nucleotides or IUPAC codes.

ignore.gaps

logical. Ignore gaps at a site when creating consensus. If true, then bases with a gap are removed before consensus is calculated. If false and a gap is present, then the result is a gap.

Value

iupacCode a character representing the correct IUPAC code bases.
validIupacCodes a character vector of all valid IUPAC codes for bases.
iupacMat a logical matrix identifying valid IUPAC codes.

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

validIupacCodes

Examples

1
2
3
4
5
6
7
8
9
iupacCode(c("a", "a", "g"))

iupacCode(c("t", "c", "g"))

validIupacCodes(c("c", "t", "c", "c"))

validIupacCodes(c("c", "y", "c", "c"))

validIupacCodes(c("a", "g", "t", "a"))

strataG documentation built on Feb. 28, 2020, 9:07 a.m.