[Bioperl-l] SearchIO: write/read database
Chu, Roy
RChu at coh.org
Tue May 20 17:22:50 UTC 2008
I've never really explored using pipes beyond the shell envrionment and
writing images w/ the bioperl GD module but always a good time to learn!
If I can't get it to work, then I'll just parse the xml output.
Thanks,
-Roy
________________________________
From: dave at davemessina.com [mailto:dave at davemessina.com] On Behalf Of
Dave Messina
Sent: Tuesday, May 20, 2008 10:10 AM
To: Chu, Roy
Cc: Sendu Bala; bioperl-l at bioperl.org
Subject: Re: [Bioperl-l] SearchIO: write/read database
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
---------------------------------------------------------------------
SECURITY/CONFIDENTIALITY WARNING:
This message and any attachments are intended solely for the individual or entity to which they are addressed. This communication may contain information that is privileged, confidential, or exempt from disclosure under applicable law (e.g., personal health information, research data, financial information). Because this e-mail has been sent without encryption, individuals other than the intended recipient may be able to view the information, forward it to others or tamper with the information without the knowledge or consent of the sender. If you are not the intended recipient, or the employee or person responsible for delivering the message to the intended recipient, any dissemination, distribution or copying of the communication is strictly prohibited. If you received the communication in error, please notify the sender immediately by replying to this message and deleting the message and any accompanying files from your system. If, due to the security risks, you do not wish to receive further communications via e-mail, please reply to this message and inform the sender that you do not wish to receive further e-mail from the sender.
---------------------------------------------------------------------
More information about the Bioperl-l
mailing list