Bioperl-guts: Proposed simple fix for Bugs #132, #133, #204

Jason Stajich jason@chg.mc.duke.edu
Tue, 11 Apr 2000 12:21:36 -0400 (EDT)


The following are proposed fixes to small Bugs in bioperl.  They will be
applied to the 06-branch and the main trunk.  I will wait 1 day to see if
anyone has any problems with these fixes. 
-----------------------------
Bug #132 - reads as follows :
Module: SeqIO::GCG
Version: 1.3
OS: Irix 6.4
Submission from: smtp.genelogic.com (38.227.237.2)
The Seq.pm module's out_fasta method generates a fasta line which looks
like

>$self->{id} $self->{desc}
seq

But the SeqIO::GCG stores strings with newlines in the description field,
making
the fasta output invalid.

Fix:
This is a problem when a seq is printed in the fasta module so
will just strip out newlines from the desc field before printing in the
SeqIO::fasta module's write_seq function
-----------------------------
Bug #133 - reads as follows:
Module:  Bio::DB::GenBank
Version: 0.05.1
OS: LINIX
Submission from: bush215.cshl.org (143.48.10.215)

Tried to retrieve GenPept ID ( CAB11162.1)
mistakingly using GenBank.pm module and 
the following fatal error occurred:

Can't call method "seq" on an undefined value
at /usr/lib/perl5/site_perl/5.005/Bio/SeqIO/Fasta.
pm line 191.

Comments: "Should we throw an exception when we can't find a sequence.
           Perhaps nicer than a null..."

Fix: 
This fixes the second part of Bug 204 as well.

in get_Seq_by_id
Throw an exception if $stream->next_seq() returns undef instead of
returning the undef.

Do this for both GenBank and GenPept.

-Jason

Jason Stajich
Center for Human Genetics
Duke University Medical Center
jason@chg.mc.duke.edu
(919)684-1806
http://www.duke.edu/~jes12/
http://wwwchg.mc.duke.edu/


=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl-guts.html
====================================================================