Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment