[Bioperl-l] Speed issues with making IUPAC consensus from alignment

Senanu senanu.pearson at gmail.com
Wed May 22 20:15:24 UTC 2013


Hi all,

I am wondering if the consensus_iupac method of Bio::Align is known to be extremely slow, or if I'm doing something wrong. 

I have bacterial whole-genome alignments (~7 Mbases) that I made in progressiveMauve and wish to get an IUPAC consensus. (I know that progressiveMauve uses a non-standard XMFA format, but Bio::AlignIO seems to read them just fine.) The code below takes more than all night to make a consensus. It works fine on tiny test alignments. 

Is this a known problem? Is there another way to generate such a consensus?


my $in = Bio::AlignIO->new(-file => $files[0],
                           -format => 'XMFA');
while  (my $aln = $in->next_aln()) {
    foreach  my $seq ($aln->each_seq) {
        $seq->alphabet('dna');
    }
    my $con = $aln->consensus_iupac();
}


Thanks in advance.
Ngwenyama



More information about the Bioperl-l mailing list