[Bioperl-l] Bio::SeqIO::genbank.pm

gert thijs gert.thijs@esat.kuleuven.ac.be
Wed, 10 Jan 2001 16:35:48 +0100


I have been using Bio::SeqIO::genbank.pm quite frequently lately and I
stumbled upon a small parsing problem. Sometimes there is no TITLE field
defined in the REFERENCE and this makes the parsing of the record fail such
that no features are detected. To solve this problem I have added 1 extra
check in  Bio::SeqIO::genbank.pm at line 602

if (/^  AUTHORS\s+(.*)/) { 
   $au .= $1;   
   while ( defined($_ = $self->_readline) ) {
       /^  TITLE/ && last;
       /^  JOURNAL/ && last;   ### when no title is given ###
       /^\s+(.*)/ && do { $au .= $1; $au =~ s/\,(\S)/ $1/g;$au .= " ";next;};
   }    
}



-- 
+ Gert Thijs              
+ 
+ email: gert.thijs@esat.kuleuven.ac.be 
+ homepage: http://www.esat.kuleuven.ac.be/~thijs
+ 
+ K.U.Leuven
+ ESAT-SISTA 
+ Kasteelpark Arenberg 10 
+ B-3001 Leuven-Heverlee  
+ Belgium  
+ Tel : +32 16 32 18 84
+ Fax : +32 16 32 19 70