[Bioperl-l] bug report - SeqIO::genbank.pm

Qunfeng qfdong at iastate.edu
Fri Aug 26 15:26:30 EDT 2005


Hi there,

Sorry I am not sure where to report bioperl bug and whether this bug has 
been reported before. So I am just going to send it to the bioperl list.

The "_read_GenBank_Species" function in SeqID::genbank.pm generates an 
exception when parsing GenBank record GI#66271013, which has an unusual 
ORGANISM name "(Populus tomentosa x P. bolleana) x P. tomentosa var. 
truncata". Notice there is a "(" in the beginning.  That "(" will be 
treated as an opening "(" for regular expression (see line 8 below) and can 
be fixed by a simple escaping (see line 7 below).


=================================================
sub _read_GenBank_Species{                              ...
   elsif (/^\s{2}ORGANISM/o) {
      my @spflds = split(' ', $_);
       ($ns_name) = $_ =~ /\w+\s+(.*)/o;
       shift(@spflds); # ORGANISM
       $spflds[0] =~ 
s/\(/\\\(/;                                          #(7)  escape the ( by \(
       if(grep { $_ =~ /^$spflds[0]/i; } @organell_names) {  #(8)  it 
causes exception with "(Populus"
           $organelle = shift(@spflds);
       }
       ...
}
=================================================

Qunfeng



More information about the Bioperl-l mailing list