Skip to content
Snippets Groups Projects
Commit 30b1838a authored by aknecht2's avatar aknecht2
Browse files

Updated workflow_job to use internal type values for arguments instead of...

Updated workflow_job to use internal type values for arguments instead of passed ones.  No longer need types included in workflow_module.
parent f852493e
No related branches found
No related tags found
No related merge requests found
......@@ -445,20 +445,22 @@ class WorkflowJob(object):
...
}
"""
if self._params_are_valid(inputs,outputs):
if self._params_are_valid(inputs, outputs):
job = Job(self.executable)
for param_name, param_info in inputs.iteritems():
if param_info["type"] == "file_list":
wj_param = self.get_param_info(param_name)
if wj_param["type"] == "file_list":
for f in param_info["value"]:
job.uses(f["file"], link=Link.INPUT)
elif param_info["type"] in chipathlon.conf.argument_types["file"]:
elif wj_param["type"] in chipathlon.conf.argument_types["file"]:
job.uses(param_info["file"], link=Link.INPUT)
for output_name, output_info in outputs.iteritems():
wj_param = self.get_param_info(output_name)
job.uses(output_info["file"], link=Link.OUTPUT, transfer=output_info["transfer"])
# Redirect stdout / stderr
if output_info["type"] == "stdout":
if wj_param["type"] == "stdout":
job.setStdout(output_file["name"])
elif output_info["type"] == "stderr":
elif wj_param["type"] == "stderr":
job.setStderr(output_file["name"])
arg_list = self._create_arg_list(inputs, outputs)
job.addArguments(*self._create_arg_list(inputs, outputs))
......@@ -575,3 +577,12 @@ class WorkflowJob(object):
else:
arg_list.append(add_value)
return arg_list
def get_param_info(self, param_name):
"""
:param param_name: The name of the input/output to get information for.
:type param_name: str
Returns the information associated with a particular input/output.
"""
return self.job_data["inputs"].get(param_name, self.job_data["outputs"].get(param_name))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment