Commit 28418e06 authored by aknecht2's avatar aknecht2
Browse files

Updated check_result to match file_name instead of just checking for existence.

parent 118d623a
......@@ -39,13 +39,13 @@ class MongoDB(object):
print "result_id %s doesn't exist." % (result_id,)
return
def check_result(self, control_sample_ids, experiment_sample_ids, ref_genome, result_type, params, debug=False):
def check_result(self, file_name, control_sample_ids, experiment_sample_ids, ref_genome, result_type, params, debug=False):
try:
query = {
"result_type": result_type,
"ref_genome": ref_genome,
"timestamp": {"$exists": True},
"file_name": {"$exists": True}
"file_name": file_name
}
# In the case that there are 0 samples we just want to check for existence.
query["control_sample_ids"] = {"$all": control_sample_ids} if (len(control_sample_ids) > 0) else {"$exists": True}
......
......@@ -265,6 +265,7 @@ class Workflow(object):
params[job_name] = job_arg_dict
result_list.append(
self.mdb.check_result(
name,
outputs[name]["control_sample_ids"],
outputs[name]["experiment_sample_ids"],
ref_genome,
......@@ -321,7 +322,7 @@ class Workflow(object):
# The output returned from the generator is more complex than
# what the module needs
module_outputs = {mod_file_name : outputs[mod_file_name]["file_name"] for mod_file_name in outputs}
download_gen.module.add_jobs(self.dax, self.jobs, self.files, markers, inputs, additional_inputs, module_outputs)
self._save_results(outputs, ref_genome)
return
......
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