Code For Generating 'Consensus' Sequence From Multisequence Alignment file
0
0
Entering edit mode
2.3 years ago
Ahmad ▴ 10

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 • 1.0k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1959 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6