Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Holland Computing Center
chipathlon
Commits
28418e06
Commit
28418e06
authored
Aug 30, 2016
by
aknecht2
Browse files
Updated check_result to match file_name instead of just checking for existence.
parent
118d623a
Changes
2
Hide whitespace changes
Inline
Side-by-side
chipathlon/db.py
View file @
28418e06
...
...
@@ -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
}
...
...
chipathlon/workflow.py
View file @
28418e06
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment