Skip to content

Instantly share code, notes, and snippets.

@oweidner
Created January 13, 2012 05:29
Show Gist options
  • Save oweidner/1604815 to your computer and use it in GitHub Desktop.
Save oweidner/1604815 to your computer and use it in GitHub Desktop.
Submitting BFAST via SAGA/Condor on OSG
import saga
try:
jd = saga.job.description()
jd.set_attribute ("Executable", "/home/oweidner/software/bfast/bin/bfast")
jd.set_vector_attribute("Arguments", ["match", "-r", "reads.10.fastq", "-A", "1", "-f", "hg_2122.fa"])
jd.set_attribute ("Output", "my_out.$(Cluster).$(Process)")
jd.set_attribute ("Error", "my_err.$(Cluster).$(Process)")
input_files = ["/home/oweidner/software/bfast/data/small/reference/hg_2122.fa > hg_2122.fa",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.10.1.bif > hg_2122.fa.cs.10.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.9.1.bif > hg_2122.fa.cs.9.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.8.1.bif > hg_2122.fa.cs.8.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.7.1.bif > hg_2122.fa.cs.7.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.6.1.bif > hg_2122.fa.cs.6.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.5.1.bif > hg_2122.fa.cs.5.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.4.1.bif > hg_2122.fa.cs.4.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.3.1.bif > hg_2122.fa.cs.3.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.2.1.bif > hg_2122.fa.cs.2.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.1.1.bif > hg_2122.fa.cs.1.1.bif",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.cs.brg > hg_2122.fa.cs.brg",
"/home/oweidner/software/bfast/data/small/reference/hg_2122.fa.nt.brg > hg_2122.fa.nt.brg",
"/home/oweidner/software/bfast/data/small/reads_5K/reads.10.fastq > reads.10.fastq"]
jd.set_vector_attribute("FileTransfer", input_files)
js = saga.job.service("condor://localhost")
job = js.create_job(jd)
job.run()
except saga.exception, e:
print "ERROR: "
for err in e.get_all_messages():
print err
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment