Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipathlon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Holland Computing Center
chipathlon
Commits
c6c1bb38
Commit
c6c1bb38
authored
8 years ago
by
aknecht2
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issues with peak call generators.
parent
7c43c9e4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
chipathlon/module_generator.py
+4
-3
4 additions, 3 deletions
chipathlon/module_generator.py
chipathlon/peak_call_generator.py
+2
-2
2 additions, 2 deletions
chipathlon/peak_call_generator.py
chipathlon/workflow_module.py
+8
-8
8 additions, 8 deletions
chipathlon/workflow_module.py
with
14 additions
and
13 deletions
chipathlon/module_generator.py
+
4
−
3
View file @
c6c1bb38
...
@@ -74,10 +74,11 @@ class ModuleGenerator(object):
...
@@ -74,10 +74,11 @@ class ModuleGenerator(object):
all_jobs
=
prev_results
[
0
].
all_jobs
all_jobs
=
prev_results
[
0
].
all_jobs
all_markers
=
final_result
.
all_markers
all_markers
=
final_result
.
all_markers
results
=
[]
results
=
[]
for
job_name
in
self
.
module
.
get_job_names
(
all_markers
[
self
.
module
.
name
])[:
-
1
]:
for
job_dict
in
self
.
module
.
get_job_list
(
all_markers
[
self
.
module
.
name
])[:
-
1
]:
job_name
=
job_dict
.
keys
()[
0
]
job_info
=
job_dict
[
job_name
]
all_jobs
.
append
(
self
.
workflow_jobs
[
job_name
])
all_jobs
.
append
(
self
.
workflow_jobs
[
job_name
])
output_list
=
self
.
module
.
get_job_params
(
all_markers
[
self
.
module
.
name
],
job_name
)[
"
outputs
"
]
for
output_info
in
job_info
[
"
outputs
"
]:
for
output_info
in
output_list
:
logical_name
=
output_info
.
keys
()[
0
]
logical_name
=
output_info
.
keys
()[
0
]
result
=
Result
(
logical_name
,
final_result
.
control_samples
,
final_result
.
signal_samples
,
all_markers
,
all_jobs
,
should_save
=
False
)
result
=
Result
(
logical_name
,
final_result
.
control_samples
,
final_result
.
signal_samples
,
all_markers
,
all_jobs
,
should_save
=
False
)
results
.
append
(
result
)
results
.
append
(
result
)
...
...
This diff is collapsed.
Click to expand it.
chipathlon/peak_call_generator.py
+
2
−
2
View file @
c6c1bb38
...
@@ -229,7 +229,7 @@ class PeakCallGenerator(ModuleGenerator):
...
@@ -229,7 +229,7 @@ class PeakCallGenerator(ModuleGenerator):
run
.
add_result
(
"
peak_call
"
,
result
)
run
.
add_result
(
"
peak_call
"
,
result
)
self
.
call_pairs
[
result
.
full_name
]
=
paired_result
self
.
call_pairs
[
result
.
full_name
]
=
paired_result
return
run
.
get_results
(
"
peak_call
"
,
"
results_sorted.
narrowPeak
"
)
return
run
.
get_results
(
"
peak_call
"
,
"
results_sorted.
bed
"
)
def
find_prev_results
(
self
,
run
,
result
):
def
find_prev_results
(
self
,
run
,
result
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
chipathlon/workflow_module.py
+
8
−
8
View file @
c6c1bb38
...
@@ -44,7 +44,7 @@ class WorkflowModule(object):
...
@@ -44,7 +44,7 @@ class WorkflowModule(object):
pass
pass
return
return
def
_
get_job_list
(
self
,
markers
):
def
get_job_list
(
self
,
markers
):
"""
"""
:param markers: A dictionary containing marker values for the module.
:param markers: A dictionary containing marker values for the module.
:type markers: dict
:type markers: dict
...
@@ -119,7 +119,7 @@ class WorkflowModule(object):
...
@@ -119,7 +119,7 @@ class WorkflowModule(object):
# If the key is a job, we need to add the job for every
# If the key is a job, we need to add the job for every
# possible marker depending on recursion depth.
# possible marker depending on recursion depth.
for
marker_values
in
itertools
.
product
(
*
[
marker
[
1
]
for
marker
in
add_markers
.
iteritems
()]):
for
marker_values
in
itertools
.
product
(
*
[
marker
[
1
]
for
marker
in
add_markers
.
iteritems
()]):
wlist
=
self
.
_
get_job_list
(
dict
(
zip
(
self
.
order
,
marker_values
)))
wlist
=
self
.
get_job_list
(
dict
(
zip
(
self
.
order
,
marker_values
)))
wlist
.
append
(
item
)
wlist
.
append
(
item
)
elif
"
[
"
in
key
and
"
]
"
in
key
:
elif
"
[
"
in
key
and
"
]
"
in
key
:
# Split by either [ or ]
# Split by either [ or ]
...
@@ -159,7 +159,7 @@ class WorkflowModule(object):
...
@@ -159,7 +159,7 @@ class WorkflowModule(object):
return
return
def
get_job_params
(
self
,
markers
,
job_name
):
def
get_job_params
(
self
,
markers
,
job_name
):
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
for
job_dict
in
job_list
:
for
job_dict
in
job_list
:
if
job_name
==
job_dict
.
keys
()[
0
]:
if
job_name
==
job_dict
.
keys
()[
0
]:
return
job_dict
[
job_name
]
return
job_dict
[
job_name
]
...
@@ -172,7 +172,7 @@ class WorkflowModule(object):
...
@@ -172,7 +172,7 @@ class WorkflowModule(object):
Returns a list of job names that match the provided markers.
Returns a list of job names that match the provided markers.
"""
"""
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
job_names
=
[]
job_names
=
[]
for
job_dict
in
job_list
:
for
job_dict
in
job_list
:
job_names
.
append
(
job_dict
.
keys
()[
0
])
job_names
.
append
(
job_dict
.
keys
()[
0
])
...
@@ -288,7 +288,7 @@ class WorkflowModule(object):
...
@@ -288,7 +288,7 @@ class WorkflowModule(object):
inputs
=
[]
inputs
=
[]
additional_inputs
=
[]
additional_inputs
=
[]
outputs
=
[]
outputs
=
[]
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
for
job_dict
in
job_list
:
for
job_dict
in
job_list
:
job_name
=
job_dict
.
keys
()[
0
]
job_name
=
job_dict
.
keys
()[
0
]
job_info
=
job_dict
[
job_name
]
job_info
=
job_dict
[
job_name
]
...
@@ -323,7 +323,7 @@ class WorkflowModule(object):
...
@@ -323,7 +323,7 @@ class WorkflowModule(object):
Walk through the jobs in the modules and add the jobs to the workflow.
Walk through the jobs in the modules and add the jobs to the workflow.
"""
"""
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
for
job_dict
in
job_list
:
for
job_dict
in
job_list
:
job_name
=
job_dict
.
keys
()[
0
]
job_name
=
job_dict
.
keys
()[
0
]
job_info
=
job_dict
[
job_name
]
job_info
=
job_dict
[
job_name
]
...
@@ -352,7 +352,7 @@ class WorkflowModule(object):
...
@@ -352,7 +352,7 @@ class WorkflowModule(object):
def
get_dependent_jobs
(
self
,
dax
,
master_jobs
,
master_files
,
markers
,
inputs
,
additional_inputs
,
outputs
):
def
get_dependent_jobs
(
self
,
dax
,
master_jobs
,
master_files
,
markers
,
inputs
,
additional_inputs
,
outputs
):
dep_list
=
[]
dep_list
=
[]
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
for
job_dict
in
job_list
:
for
job_dict
in
job_list
:
job_name
=
job_dict
.
keys
()[
0
]
job_name
=
job_dict
.
keys
()[
0
]
job_info
=
job_dict
[
job_name
]
job_info
=
job_dict
[
job_name
]
...
@@ -363,7 +363,7 @@ class WorkflowModule(object):
...
@@ -363,7 +363,7 @@ class WorkflowModule(object):
return
dep_list
return
dep_list
def
get_final_outputs
(
self
,
markers
):
def
get_final_outputs
(
self
,
markers
):
job_list
=
self
.
_
get_job_list
(
markers
)
job_list
=
self
.
get_job_list
(
markers
)
job_dict
=
job_list
[
-
1
]
job_dict
=
job_list
[
-
1
]
job_name
=
job_dict
.
keys
()[
0
]
job_name
=
job_dict
.
keys
()[
0
]
outputs
=
job_dict
[
job_name
][
"
outputs
"
]
outputs
=
job_dict
[
job_name
][
"
outputs
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment