[Bioperl-l] Bug in the Bio::SeqIO.scf.pm code

Anthony Underwood Anthony.Underwood at hpa.org.uk
Mon Jan 29 11:29:16 UTC 2007


Hi All,

 

Has anybody else come across this problem:

 

I have some scf files that fail to be read by the next_seq method within
scf.pm due to line 226: my $name_comment = $name_comments[0]->as_text();

Error: can not call method as_text on undefined object.

 

It appears that if the scf file has no comments then the array
@name_comments created in the previous line is empty.

 

I overcame this by replacing line 226 with the following lines:

my $name_comment;

if (@name_comments){

     $name_comment = $name_comments[0]->as_text();

     $name_comment =~ s/^Comment:\s+//;

}

 

 

Should this be incorporated into the code? Many thanks,

 

Anthony




-----------------------------------------
*******************************************************************
*******
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk **************************
************************************************




More information about the Bioperl-l mailing list