Bioperl: distributing blast searches across multiple local machines

Tim Beissbarth T.Beissbarth@dkfz-heidelberg.de
Fri, 30 Oct 1998 10:18:28 +0100


--PBBBuxDV/9iCvv+ZwN1iuPdaW/5aDL1thPiOWp04
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Chris!

Chris Dagdigian writes:
 > Is anyone aware of any public domain code that handles the
 > details of spreading lots of blast searches out over many
 > local machines?
I think there is a number of solutions to distribute Programs on a
cluster of Workstations. We usually use "codine" which is not free
though. But I heared there is a non comercial predesessor of codine.

 > I'm about to start writing one in perl so that I can
 > make more efficient use of our various Alpha boxes. I'm
 > not talking about anything super heavy duty-- just spreading
 > load over a small number of very high-end servers.
For personell use I wrote a very simple perl script to iterate through
a number of files the same command. I did this to run for example a
blast for each sequence file in a directory, I also added a feature to
distribute the jobs on a set of local machines. It uses rsh to
start the commands, you only need to have the same or a very similar
directoy structure on all of the machines. You get a simple help about
the basic Functions by just typing the command.


--PBBBuxDV/9iCvv+ZwN1iuPdaW/5aDL1thPiOWp04
Content-Type: application/text
Content-Disposition: attachment;
	filename="iterate.pl"
Content-Transfer-Encoding: base64

IyEvdXNyL2xvY2FsL2Jpbi9wZXJsCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMKIyBDb21t
YW5kIGl0ZXJhdG9yCiMKIyBVc2UgdG8gaXRlcmF0ZSBjb21tYW5kcyBvbiBhIG51bWJlciBv
ZiBmaWxlcy4gSXQgdXNlcyByZWd1bGFyIGV4cHJlc3Npb25zCiMgdG8gc3BlY2lmeSB0aGUg
ZmlsZSBwYXR0ZXJuIHRvIGl0ZXJhdGUgYW5kIGxldHMgeW91IHNwZWNpZnkgYSByZXBsYWNl
IAojIHBhdHRlcm4gdG8gc3BlY2lmeSBvdXRwdXQgZmlsZXMuCiMKIyBUaGUgc2tyaXB0IGFs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kuKVxuIjsJCQkgICAgCQkJICAgICAgCiAgICBwcmludCAiRVhBTVBMRVM6
XG4iOyAKICAgIHByaW50ICIkcHJvZ3JhbV9uYW1lIC1mPVwiKCopLnBsXCIgLXI9XCIlZi5i
YWtcIiBtdiAlZiAlclxuIjsKICAgIHByaW50ICIkcHJvZ3JhbV9uYW1lIG12ICVmLnBsICVy
LmJha1xuIjsKICAgIHByaW50ICIkcHJvZ3JhbV9uYW1lIFwibXYgKi5wbCAqLmJha1wiXG4i
OwogICAgcHJpbnQgIiRwcm9ncmFtX25hbWUgLWY9XCIoKikuKCopXCIgLXI9XCIlMC4xLiUx
XCIgY3AgJWYgJXIgLVRcbiI7CiAgICBwcmludCAiJHByb2dyYW1fbmFtZSAtVCAtZj1cIigq
KS5ibGFzdG5cIiBNU1BjcnVuY2ggJWYgXCI+PlwiIGJsYXN0cy5jcnVuY2hcbiI7CiAgICBw
cmludCAiJHByb2dyYW1fbmFtZSAtRj00IC1SPVwicmlvIC4gYmFieWxvblwiIC1OPTE5IFwi
Ymxhc3RuIGVtYmwgKi5zZXEgPiAqLmJsYXN0blwiXG4iOwogICAgcHJpbnQgIiRwcm9ncmFt
X25hbWUgLUMgYmxhc3RuIFJPRCBcXCouc2VxIFxcPiBcXCouYmxhc3RuXG4iOwp9CgoKCg==

--PBBBuxDV/9iCvv+ZwN1iuPdaW/5aDL1thPiOWp04
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


 > If nothing is publically available, any pointers, warnings,
 > code snippets or horror stories would be appreciated.
Well maybe this helps you. Yet, I'm sure there is still a lot of bugs
in it. I am changing it whenever I notice one. I would be happy if you
would let me now of bugs or tell me major improvements or ways you
implemented things yourself. 

Cheers,

Tim

--PBBBuxDV/9iCvv+ZwN1iuPdaW/5aDL1thPiOWp04--
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================