[Bioperl-l] AlignIO crashes when reading stockholm alignment with negative PDB ranges

albezg albezg at gmail.com
Wed Jan 13 20:57:27 EST 2010

Hi all,

I have a problem using AlignIO to read Pfam database:
The database is in STOCKHOLM 1.0 format. AlignIO can read the alignment 
OK until the alignment PF00331.13. There it crashes with the following 

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: '1-344' is not an integer.

STACK: Error::throw
STACK: Bio::Root::Root::throw 
STACK: Bio::Range::end 
STACK: Bio::Annotation::Target::new 
STACK: Bio::AlignIO::Handler::GenericAlignHandler::_stockholm_target 
STACK: Bio::AlignIO::Handler::GenericAlignHandler::data_handler 
STACK: Bio::AlignIO::stockholm::next_aln 
STACK: /home/albezg/scripts/pfam2fasta.pl:22

It appears this is caused by this entry:
#=GS XYNA_PSEFL/263-608    DR PDB; 1e5n B; -1-344;

I don't care about residues in PDB, so I have just removed minus signs 
from the ranges. This seems to have fixed the crashing.

Is it a known problem? Is there a solution for it?


On 03/20/2009 05:09 PM, albezg wrote:
> I'm trying to change FASTA header(display_id) for a sequence in an
> alignment(SimpleAlign).
> There are no issues when I print it, however when I use AlignIO to write
> the alignment to a FASTA file, it does not work. Is this behavior intended?
> Demo code: http://github.com/jhannah/sandbox/tree/master/Bio_AlignIO_bug
> The error:
> ------------- EXCEPTION -------------
> MSG: No sequence with name [1/1-11]
> STACK Bio::SimpleAlign::displayname
> /scratch/BioSoftware/bioperl-live/Bio/SimpleAlign.pm:2659
> STACK Bio::AlignIO::fasta::write_aln
> /scratch/BioSoftware/bioperl-live/Bio/AlignIO/fasta.pm:200
> STACK toplevel ./demo.pl:14
> -------------------------------------
> Alexandr

More information about the Bioperl-l mailing list