ConsSeq: Consensus sequence given an alignment and frequencies

View source: R/ConsSeq.R

ConsSeqR Documentation

Consensus sequence given an alignment and frequencies

Description

ConsSeq determines the consensus sequence from a set of haplotypes.

Usage

ConsSeq(seqs, w=NULL)

Arguments

seqs

DNAStringSet or AAStringSet object with the haplotype sequences.

w

An optional numeric vector with the haplotype counts.

Details

The most frequent nucleotide or amino acid at each position is taken. No IUPAC ambiguity codes are considered; in the case of ties, the consensus nucleotide is decided randomly.

Value

Character vector with the consensus sequence.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

See Also

ReadAmplSeqs

Examples

filepath<-system.file("extdata","ToyData_10_50_1000.fna", package="QSutils")
lst <- ReadAmplSeqs(filepath,type="DNA")

ConsSeq(lst$hseqs,lst$nr)

VHIRHepatiques/QSutils documentation built on April 12, 2024, 12:25 p.m.