Learn R Programming

strataG (version 2.0.2)

createConsensus: Consensus Sequence

Description

Return a consensus sequence from set of aligned sequences, introducing IUPAC ambiguity codes where necessary.

Usage

createConsensus(x, ignore.gaps = FALSE)

Arguments

x

a '>gtypes object with aligned sequences or a list of aligned DNA sequences.

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 vector of the consensus sequence.

Examples

Run this code
# NOT RUN {
data(dolph.seqs)
createConsensus(dolph.seqs)

# }

Run the code above in your browser using DataLab