[Bioperl-l] BioFetch_DB tests

Elia Stupka elia at tll.org.sg
Mon Mar 10 18:46:35 EST 2003


Hello guys,

spent quite a while trying to figure out why a couple of tests fail in 
BioFetch_DB were failing, for now I fixed three of them not in the 
prettiest way...

...it turns out that when the following code gets called

$db = new Bio::DB::BioFetch(-retrievaltype => 'tempfile',
                                  -format => 'fasta',
                                  -verbose => $verbose
                                 );
BioFetch which inherits from Bio::DB::WebDBSeqI gets stuff using 
LWP::UserAgent and stuffs it directly to a temp file. The fasta format 
from the web comes with empty lines before the actual entries start and 
that makes SeqIO return an empty Seq before it returns the real ones, 
which in turn breaks the tests...

Now, I could not figure out a more upstream way of fixing it (because 
it just gets it and dumps into a file using the request method on 
LWP::UserAgent), so what I added is that the file gets opened, empty 
lines get removed, and a new fixed file gets written which gets passed 
to SeqIO.

The other option is to fix the SeqIO::fasta to accept this, but I had a 
feeling (maybe wrong) that people wouldn't want to loosen our fasta 
parser...

Also, there is a test that fetches P43780 from swall, and it fails 
because nothing is returned,   that one so far is unfixed, I am not 
sure why it's coming back empty...

Elia



More information about the Bioperl-l mailing list