20 May 11:52
Re: SearchIO: write/read database
From: Sendu Bala <bix <at> sendu.me.uk>
Subject: Re: SearchIO: write/read database
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-05-20 09:52:03 GMT
Subject: Re: SearchIO: write/read database
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-05-20 09:52:03 GMT
Chu, Roy wrote: > Hi, > > I tried a mailing-list and module search, but I couldn't find what I > was looking for--but I know it's there. > > On the bioperl page > (http://www.bioperl.org/wiki/HOWTO:SearchIO#Writing_and_formatting_output) > it says: "If your data is instead stored in a database you could > build the Bio::Search objects up in memory directly from your > database and then use the Writer object to output the data." > > I want to write/read BLAST results to a database w/o having to write > to files or parse any xml. Can someone direct me to any available > module(s) that will help me in my endeavor? I've not used Writer so perhaps someone has a better answer, but... Bio::Tools::Run::StandAloneBlast always creates a temporary file at least, so you may not want to use that to run your blasts. Let's say you arrange for the output of your blast executable to be (perhaps indirectly) piped into your database. If your question is then how to parse that data in your database without creating a file on disc, just arrange to pull the data out of your database into memory as a perl string, treat that string as a file handle, then supply that FH to a SearchIO. Using Bio::SearchIO::blast_pull here may be beneficial. Alternatively, if you wanted to store parsed results in your db, again you could arrange for to run your blast executable but this time pipe into blast_pull (which avoids any temp files), and store the desired Bio::Search::* objects in your db for later retrieval.
RSS Feed