ConsSeq {QSutils} | R Documentation |
ConsSeq determines the consensus sequence from a set of haplotypes.
ConsSeq(seqs, w=NULL)
seqs |
DNAStringSet or AAStringSet object with the haplotype sequences. |
w |
An optional numeric vector with the haplotype counts. |
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.
Character vector with the consensus sequence.
Mercedes Guerrero-Murillo and Josep Gregori
filepath<-system.file("extdata","ToyData_10_50_1000.fna", package="QSutils") lst <- ReadAmplSeqs(filepath,type="DNA") ConsSeq(lst$hseqs,lst$nr)