createConsensus: Consensus Sequence

View source: R/createConsensus.R

createConsensusR Documentation

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.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

data(dolph.seqs)
createConsensus(dolph.seqs)


EricArcher/strataG documentation built on Feb. 12, 2023, 4:11 a.m.