[Bioperl-l] SearchIO: write/read database

Dave Messina David.Messina at sbc.su.se
Tue May 20 13:10:26 EDT 2008

Echoing what Sendu said, the most straightforward way to read output from a
program without writing to a file first is to open a pipe from the program
as a filehandle.

my @args = ('/usr/bin/blastp', '/path/to/my/blastdb',
open (my $blast_fh, '-|', @args) or die "couldn't open blast stream";

Now you can use that filehandle to read in data and manipulate just as if
you had read it in from a file (except of course since it's a stream you
can't rewind).


More information about the Bioperl-l mailing list