20 May 19:10
Re: SearchIO: write/read database
From: Dave Messina <David.Messina <at> sbc.su.se>
Subject: Re: SearchIO: write/read database
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-05-20 17:10:26 GMT
Subject: Re: SearchIO: write/read database
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-05-20 17:10:26 GMT
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.
e.g.
my @args = ('/usr/bin/blastp', '/path/to/my/blastdb',
'/path/to/my/blastquery');
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).
Dave
RSS Feed