This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Multiple Sequence Alignment Editor With Option To Generate Consensus Sequence

Hello, could anyone suggest me an alignment editor program that generates a reliable consensus sequence out the MSA? I tried a number of such programs (Bioedit, Jalview, Seaview etc.). Problem: there is option to change the parameters (threshold values) however, the length of consensus sequence is different while changing the parameters. It can be best explained by the image below. For me, the program should generate the consensus with equal length by ignoring obviously underrepresented positions.

The figure shows part of an alignment having hundreds of sequences. The number after consensus (consensxx) denotes the threshold value (in Seaview program).

Thanks in advance

consensus alignment multiple

You could write a python script to calculate the consensus you had in mind and write it as a .fa for importing into the MSA editor.

2 answers

I've used CodonCode Aligner and Geneious previously and both seem to work well at this, however they are commercial apps and I'm not sure if the trial versions will work with any more than a few sequences (although Geneious seems to have quite a lot of free functionality).

You could use BioPerl's Bio::SimpleAlign to generate a consensus from an MSA, or BioPython's Bio.AlignIO module.

Perl:

use strict;
use warnings;
use Bio::SimpleAlign;

my $alignment = Bio::SimpleAlign->new('alignment.fas');
my $consensus = $aln->consensus_iupac();

Python:

from Bio import AlignIO
from Bio.Align import AlignInfo

alignment = AlignIO.read(open("alignment.fas"), "fasta")
summary_align = AlignInfo.SummaryInfo(alignment)
consensus = summary_align.dumb_consensus()

Thanks a lot !!

Try MEGA..http://www.megasoftware.net/

Log in to answer this question.