strataG (version 2.4.905)

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, simplify = TRUE)

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.

simplify

if there is a single locus, return result in a simplified form? If FALSE a list will be returned wth one element per locus.

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