Commit c1d6bd20 authored by aknecht2's avatar aknecht2
Browse files

Fixed minor typos and spacing issues in workflow_module.

parent a958579c
......@@ -202,6 +202,7 @@ class WorkflowModule(object):
Checks all input params to make sure they are specified, and all files
exist in the master file dictionary.
"""
valid_params = True
valid_markers, msg = self._check_input_markers(markers)
if valid_markers:
required_inputs, required_additional_inputs, required_outputs = self._load_required_params(master_files, markers)
......@@ -253,7 +254,7 @@ class WorkflowModule(object):
"""
valid = True
msg = ""
for param_dict in required_list:
for param_dict in required_param_list:
param_name = param_dict["name"]
if param_name in arg_params:
if param_dict["type"] in chipathlon.conf.argument_types["file"]:
......@@ -283,7 +284,7 @@ class WorkflowModule(object):
for job_dict in job_list:
job_name = job_dict.keys()[0]
job_info = job_dict[job_name]
for param_type, param_list in zip(["inputs", "additional_inputs", "outputs"], [inputs, additional_files, output_files]):
for param_type, param_list in zip(["inputs", "additional_inputs", "outputs"], [inputs, additional_inputs, outputs]):
if job_info[param_type] is not None:
for param_dict in job_info[param_type]:
param_name = param_dict.keys()[0]
......@@ -338,39 +339,39 @@ class WorkflowModule(object):
dax.depends(child = job, parent = master_jobs[file_dict["name"]])
return
def _setup_job_params(self, master_files, job_info, markers, param_type, arg_params):
"""
:param master_files: Master file dictionary mapping file_names -> file objects.
:type master_files: dict
:param job_info: The job information (inputs, additional_inputs, and outputs)
:type job_info: dict
:param markers: Input markers.
:type markers: dict
:param param_type: The param type to setup should be inputs, additional_inputs, or outputs.
:type param_type: str
:param arg_params: A dictionary mapping param_name -> value.
:type arg_params: dict
def _setup_job_params(self, master_files, job_info, markers, param_type, arg_params):
"""
:param master_files: Master file dictionary mapping file_names -> file objects.
:type master_files: dict
:param job_info: The job information (inputs, additional_inputs, and outputs)
:type job_info: dict
:param markers: Input markers.
:type markers: dict
:param param_type: The param type to setup should be inputs, additional_inputs, or outputs.
:type param_type: str
:param arg_params: A dictionary mapping param_name -> value.
:type arg_params: dict
This function sets up the required params for a job to run
successfully. Primarily, it converts the format from the dictionary
style passed into the module, to the list style expected for job
creation.
"""
param_list = []
if job_info[param_type] is not None:
for job_dict in job_info[param_type]:
param_name = job_dict.keys()[0]
param = job_dict[param_name]
if param["type"] in chipathlon.conf.argument_types["file"]:
param_list.append({
"name": param_dict[param_name],
"file": master_files[param_dict[param_name]],
"type": param["type"]
})
else:
param_list.append({
"name": param_name,
"value": param_dict[param_name],
"type": param["type"]
})
return param_list
This function sets up the required params for a job to run
successfully. Primarily, it converts the format from the dictionary
style passed into the module, to the list style expected for job
creation.
"""
param_list = []
if job_info[param_type] is not None:
for job_dict in job_info[param_type]:
param_name = job_dict.keys()[0]
param_info = job_dict[param_name]
if param_info["type"] in chipathlon.conf.argument_types["file"]:
param_list.append({
"name": arg_params[param_name],
"file": master_files[arg_params[param_name]],
"type": param_info["type"]
})
else:
param_list.append({
"name": param_name,
"value": arg_params[param_name],
"type": param_info["type"]
})
return param_list
Supports Markdown
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