Commit c98640e1 authored by aknecht2's avatar aknecht2
Browse files

Removed config files as being necessary. Added chip-bin and idr bin argumens...

Removed config files as being necessary.  Added chip-bin and idr bin argumens to workflow & chip-gen scripts.
parent f85c8175
......@@ -70,7 +70,8 @@ executables = [
"chip-job-sort-peak",
"chip-job-zcat-peak",
"chip-job-zerone-format",
"chip-job-hd-format"
"chip-job-hd-format",
"pegasus-email"
]
# Java needs to have -Xmx specified...
......
......@@ -57,8 +57,8 @@ class Workflow(object):
executables.
"""
def __init__(self, job_home, run_file, param_file, config_file,
properties_file, execute_site="local", output_site="local",
def __init__(self, job_home, run_file, param_file, properties_file,
chip_bin, idr_bin, execute_site="local", output_site="local",
host="localhost", username=None, password=None, save_db=True,
rewrite=False, debug=False):
# debug mode, print out additional information
......@@ -84,7 +84,8 @@ class Workflow(object):
self.run_file = os.path.abspath(run_file)
self.param_file = os.path.abspath(param_file)
self.properties_file = os.path.abspath(properties_file)
self.config_file = os.path.abspath(config_file)
self.chip_bin = chip_bin
self.idr_bin = idr_bin
# Dax specific info
self.dax = ADAG(os.path.basename(os.path.dirname(self.job_home + "/")))
......@@ -196,7 +197,7 @@ class Workflow(object):
for executable in chipathlon.conf.executables:
self._add_executable(
executable,
os.path.join(self.config["idr_bin"] if executable == "idr" else self.config["chipathlon_bin"], executable),
os.path.join(self.idr_bin if executable == "idr" else self.chip_bin, executable),
site=self.execute_site,
arch=self.config.get("arch", "x86_64"),
os_type=self.config.get("os", "linux")
......@@ -207,7 +208,7 @@ class Workflow(object):
if not os.path.splitext(f)[1] == '.pyc':
self._add_executable(
f,
os.path.join(self.config["chipathlon_bin"], f),
os.path.join(self.chip_bin, f),
site=self.execute_site,
arch=self.config.get("arch", "x86_64"),
os_type=self.config.get("os", "linux")
......@@ -347,8 +348,8 @@ class Workflow(object):
with open(notify_path, "w") as wh:
notify = textwrap.dedent("""\
#!/bin/bash
%s/notification/email -t %s --report=pegasus-analyzer
""" % (self.config["pegasus_home"], self.config["email"]))
pegasus-email -t %s --report=pegasus-analyzer
""" % (self.config["email"],))
wh.write(notify)
os.chmod(notify_path, 0755)
self.dax.invoke(When.AT_END, notify_path)
......
......@@ -13,6 +13,8 @@ parser.add_argument("--run", dest="run", required=True, help="Path to run file t
parser.add_argument("--properties", dest="properties", required=True, help="Path to pegasus properties file.")
parser.add_argument("--execute-site", dest="execute_site", required=True, default="local", help="Target execute site. Sites should be defined in configuration.")
parser.add_argument("--output-site", dest="output_site", required=True, default="local", help="Target output site. Site should be defined in configuration.")
parser.add_argument("--chip-bin", dest="chip_bin", required=True, help="Path to chipathlon conda environment bin.")
parser.add_argumnet("--idr-bin", dest="idr_bin", required=True, help="Path to idr conda enviornment bin.")
parser.add_argument("--no-save-db", dest="save_db", default=True, action="store_false", help="Whether or not to save results to the database. Default: True")
parser.add_argument("--rewrite", dest="rewrite", default=False, action="store_true", help="If specified, don't load from the database, rewrite files.")
......
......@@ -13,6 +13,8 @@ parser.add_argument("--run", dest="run", required=True, help="Path to run file t
parser.add_argument("--properties", dest="properties", required=True, help="Path to pegasus properties file.")
parser.add_argument("--execute-site", dest="execute_site", required=True, default="local", help="Target execute site. Sites should be defined in configuration.")
parser.add_argument("--output-site", dest="output_site", required=True, default="local", help="Target output site. Site should be defined in configuration.")
parser.add_argument("--chip-bin", dest="chip_bin", required=True, help="Path to chipathlon conda environment bin.")
parser.add_argumnet("--idr-bin", dest="idr_bin", required=True, help="Path to idr conda enviornment bin.")
parser.add_argument("--no-save-db", dest="save_db", default=True, action="store_false", help="Whether or not to save results to the database. Default: True")
parser.add_argument("--rewrite", dest="rewrite", default=False, action="store_true", help="If specified, don't load from the database, rewrite files.")
......@@ -23,8 +25,9 @@ workflow = Workflow(
args.dir,
args.run,
args.param,
args.config,
args.properties,
args.chip_bin,
args.idr_bin,
host=args.host,
username=args.username,
password=args.password,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment