This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Code For Generating 'Consensus' Sequence From Multisequence Alignment file

Hi All, I have Multisequence Alignment file (format = clustal) for 10 sequences, I'd like to find a consensus sequence by biopython. I used these code

from Bio import AlignIO
from Bio.Align import AlignInfo
summary_align = AlignInfo.SummaryInfo(align)
consensus = summary_align.dumb_consensus()

but the obtained sequence had X (the code when find mismatching putted X).

multisequence biopython consensus code alignment

X is the default ambiguous character. A dumb consensus is a simply majority-rule consensus sequence, so it throws an X in when there are equal numbers of different substitutions.

You haven't explained why this is a problem or what you are aiming to obtain. I suspect the short answer to your question will be to use a more sophisticated consensus calling method.

0 answers

No answers yet.

Log in to answer this question.