[Bioperl-l] SearchIO: write/read database
cjfields at uiuc.edu
Tue May 20 13:23:19 EDT 2008
On May 20, 2008, at 12:10 PM, Dave Messina wrote:
> 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
> 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
> can't rewind).
I think that works with everything except Win32 (unless more progress
has been made on that front), which if I recall doesn't deal well with
pipes/forks. That may have changed, though; anyone know?
More information about the Bioperl-l