[Bioperl-l] SearchIO error

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Wed Jun 30 04:34:23 EDT 2004

Ooops, I was using it incorrectly - RTFM etc :-)

Having said that though, for consistency, if one has to pass a writer
object to SearchIO, shouldn't one also have to pass a writer to SeqIO?
Presumably when one specifies (-format=>EMBL, -file=>">out.embl") in
SeqIO, then internally bioperl goes to get an EMBL writer object anyway?
So maybe the internals of SeqIO and SearchIO are pretty similar, yet in
one you pass a -format argument, and in another you pass a writer

Though I could, of course, be completely wrong.

Thanks for the help!


-----Original Message-----
From: Jason Stajich [mailto:jason at cgt.duhs.duke.edu] 
Sent: 23 June 2004 14:17
To: michael watson (IAH-C)
Cc: Bioperl-l
Subject: Re: [Bioperl-l] SearchIO error

More correctly - what do you want to see in your out.blast?  a table?
the blast report?

If you read the docs for how to use a hit writer you'll see it isn't as
parallel to SeqIO type ways - you need to give SearchIO a writer object
when you initialize it for writing.  But if you are just re-writing out
a blast file why parse it with SearchIO in the first place?


On Wed, 23 Jun 2004, michael watson (IAH-C) wrote:

> Hi
> I am using bioperl-1.4 now.  I seem to get an error when using 
> SearchIO. Perhaps I am not using it correctly?  My script is:
> my $fh = new IO::File;
> $fh->open("/usr/bin/blastall -p blastp -i test.fasta -d 10287/set2 
> |");
> my $searchio = Bio::SearchIO->new(-format => 'blast', -fh => $fh); my 
> $result = $searchio->next_result;
> my $search_out = Bio::SearchIO->new(-format => 'blast', -file => 
> ">test_out.blast"); $search_out->write_result($result);
> $fh->close;
> The error I get is:
> -------------------- WARNING ---------------------
> MSG: Writer not defined. Using a Bio::Search::Writer::HitTableWriter
> ---------------------------------------------------
> Can't locate object method "new" via package 
> "Bio::Search::Writer::HitTableWriter" (perhaps you forgot to load
> "Bio::Search::Writer::HitTableWriter"?) at 
> /usr/local/bioperl-1.4/Bio/SearchIO/blast.pm line 1493, <GEN0> line 
> 397.
> Can anyone be of help?
> Thanks
> Mick
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org 
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

Jason Stajich
Duke University
jason at cgt.mc.duke.edu

More information about the Bioperl-l mailing list