[Bioperl-l] searchio scripts

Steve Chervitz steve_chervitz at affymetrix.com
Wed Feb 18 05:27:57 EST 2004

Looks like there was a change in the Root::IO.pm module that affects 
the way these scripts process command-line arguments. As of 
bioperl-1.303, the SearchIO::blast module appears to be unable to read 
data from STDIN or files listed in @ARGV. This affects the scripts in 
examples/searchio and scripts/searchio.

As a workaround, I'd recommend you iterate over @ARGV in your script 
and initialize the SearchIO object using the -file option to new(), as 

while (my $file = shift @ARGV) {
     my $in = Bio::SearchIO->new( -format => 'blast',
                                  -file => $file
     while ( my $result = $in->next_result() ) {
         # process result...

As far as tracking down the cause, I've pinpointed the following change 
in Bio::Root::IO::_readline():

     my $fh = $self->_fh or return;   # revision 1.50 (bioperl-1.303)

formerly this was:

     my $fh = $self->_fh || \*ARGV;   # revision 1.49 (bioperl-1.302)

This also appears to break SeqIO reading from STDIN. Try executing this 
at the top-level distribution dir for the 1.302 and 1.303 releases:

     perl -I. ./scripts/seq/translate_seq.PLS -format fasta < 

According to Lincoln's commit log, the Root::IO::_readline() change was 
necessary to get the GFF, SeqFeature, and Registry regression tests 
working. I tested these tests with the 1.49 version of IO.pm and the 
only one that was affected was SeqFeature.t. Specifically, test #6 
which calls SeqFeature::Generic::gff_string() hangs and waits for input 
before proceeding. I'm not sure why this is... (getting late).

BTW, platforms tested: Perl 5.6.1 and 5.8.0 on Linux (RH9) and Perl 
5.8.1-RC3 on MacOS X (10.3.2).


On Feb 17, 2004, at 3:14 PM, Richard Rouse wrote:

> I recent installed bioperl-1.4 and am having problems with the blast 
> report
> parsers in /examples/searchio/
> When I run:
> perl hitwriter.pl blastreport
> I get:
> Using SearchIO->new()
> 0 Blast report(s) processed.
> Output sent to file: >hitwriter.out
> I get the same result with rawwriter.pl, hspwriter.pl and 
> custom_writer.pl
> although the htmlwriter.pl and the blast_example.pl work fine.
> Has anyone else encountered this problem and figured out how to fix it?
> Thanks,
> Richard
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list