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
ea0b684f
Commit
ea0b684f
authored
7 years ago
by
aknecht2
Browse files
Options
Downloads
Patches
Plain Diff
Updated module generator to corerctly create download jobs.
parent
6bd0748c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
chipathlon/generators/module_generator.py
+45
-21
45 additions, 21 deletions
chipathlon/generators/module_generator.py
with
45 additions
and
21 deletions
chipathlon/generators/module_generator.py
+
45
−
21
View file @
ea0b684f
...
...
@@ -80,9 +80,7 @@ class ModuleGenerator(object):
job_info
=
job_dict
[
job_name
]
all_jobs
.
append
(
self
.
workflow_jobs
[
job_name
])
if
job_info
.
get
(
"
outputs
"
):
for
output_dict
in
job_info
[
"
outputs
"
]:
logical_name
=
output_dict
.
keys
()[
0
]
output_info
=
output_dict
[
logical_name
]
for
logical_name
,
output_info
in
job_info
[
"
outputs
"
].
iteritems
():
# We have to explicitly compare since None evalutes to False.
if
not
output_info
.
get
(
"
final_result
"
)
==
True
:
result
=
Result
(
...
...
@@ -128,16 +126,32 @@ class ModuleGenerator(object):
Download the target result from gridfs.
"""
db_result
=
result
.
get_db_result
(
self
.
mdb
,
run
.
genome
)
inputs
=
[
{
"
name
"
:
"
host
"
,
"
type
"
:
"
string
"
,
"
value
"
:
self
.
mdb
.
host
},
{
"
name
"
:
"
username
"
,
"
type
"
:
"
string
"
,
"
value
"
:
self
.
mdb
.
username
},
{
"
name
"
:
"
password
"
,
"
type
"
:
"
string
"
,
"
value
"
:
self
.
mdb
.
password
},
{
"
name
"
:
"
id
"
,
"
type
"
:
"
string
"
,
"
value
"
:
db_result
[
"
gridfs_id
"
]}
]
outputs
=
[
{
"
name
"
:
result
.
full_name
,
"
type
"
:
"
file
"
,
"
file
"
:
result
.
pegasus_file
,
"
transfer
"
:
False
}
]
download_job
=
self
.
workflow_jobs
[
"
download_from_gridfs
"
].
create_job
(
inputs
,
[],
outputs
)
inputs
=
{
"
host
"
:
{
"
name
"
:
"
host
"
,
"
value
"
:
self
.
mdb
.
host
},
"
username
"
:
{
"
name
"
:
"
username
"
,
"
value
"
:
self
.
mdb
.
username
},
"
password
"
:
{
"
name
"
:
"
password
"
,
"
value
"
:
self
.
mdb
.
password
},
"
id
"
:
{
"
name
"
:
"
id
"
,
"
value
"
:
db_result
[
"
gridfs_id
"
]
}
}
outputs
=
{
"
downloaded_result
"
:
{
"
name
"
:
result
.
full_name
,
"
file
"
:
result
.
pegasus_file
,
"
transfer
"
:
False
}
}
download_job
=
self
.
workflow_jobs
[
"
download_from_gridfs
"
].
create_job
(
inputs
,
outputs
)
if
download_job
is
not
None
:
self
.
master_files
[
result
.
full_name
]
=
result
.
pegasus_file
self
.
dax
.
addJob
(
download_job
)
...
...
@@ -153,14 +167,24 @@ class ModuleGenerator(object):
"""
# Assuming we only call on a result file with 1 accession
sample
=
result
.
control_samples
[
0
]
if
len
(
result
.
control_samples
)
>
0
else
result
.
signal_samples
[
0
]
inputs
=
[
{
"
name
"
:
"
url
"
,
"
type
"
:
"
string
"
,
"
value
"
:
sample
[
"
hcc_url
"
]
if
"
hcc_url
"
in
sample
else
sample
[
"
url
"
]},
{
"
name
"
:
"
md5
"
,
"
type
"
:
"
string
"
,
"
value
"
:
sample
[
"
md5sum
"
]}
]
outputs
=
[
{
"
name
"
:
result
.
full_name
,
"
type
"
:
"
file
"
,
"
file
"
:
result
.
pegasus_file
,
"
transfer
"
:
False
}
]
download_job
=
self
.
workflow_jobs
[
"
download_from_encode
"
].
create_job
(
inputs
,
[],
outputs
)
inputs
=
{
"
url
"
:
{
"
name
"
:
"
url
"
,
"
value
"
:
sample
[
"
hcc_url
"
]
if
"
hcc_url
"
in
sample
else
sample
[
"
url
"
]
},
"
md5
"
:
{
"
name
"
:
"
md5
"
,
"
value
"
:
sample
[
"
md5sum
"
]
}
}
outputs
=
{
"
downloaded_file
"
:
{
"
name
"
:
result
.
full_name
,
"
file
"
:
result
.
pegasus_file
,
"
transfer
"
:
False
}
}
download_job
=
self
.
workflow_jobs
[
"
download_from_encode
"
].
create_job
(
inputs
,
outputs
)
if
download_job
is
not
None
:
self
.
master_files
[
result
.
full_name
]
=
result
.
pegasus_file
self
.
dax
.
addJob
(
download_job
)
...
...
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