Learn R Programming

strataG (version 2.0.2)

iupacCode: IUPAC Code

Description

Calculate the correct IUPAC code for a vector of nucleotides.

Usage

iupacCode(bases, ignore.gaps = FALSE)

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

a character representing the correct IUPAC code.

See Also

validIupacCodes

Examples

Run this code
# NOT RUN {
iupacCode(c("a", "a", "g"))

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

# }

Run the code above in your browser using DataLab