Return the majority consensus sequence for the Alignment
Note
constructor parameter deprecated in scikit-bio 0.2.0-dev constructor parameter will be removed in scikit-bio 0.3.0 as its most common use is to convert to str, and this functionality is already accessible by calling str on the returned BiologicalSequence (e.g., str(seq)).
Parameters: | constructor : function, optional
|
---|---|
Returns: | skbio.sequence.BiologicalSequence
|
Notes
If there are two characters that are equally abundant in the sequence at a given position, the choice of which of those characters will be present at that position in the result is arbitrary.
Examples
>>> from skbio.alignment import Alignment
>>> from skbio.sequence import DNA
>>> sequences = [DNA('AC--', id="seq1"),
... DNA('AT-C', id="seq2"),
... DNA('TT-C', id="seq3")]
>>> a1 = Alignment(sequences)
>>> a1.majority_consensus()
<DNASequence: AT-C (length: 4)>