Skip to content
GitLab
Menu
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
f4bf8215
Commit
f4bf8215
authored
Apr 06, 2016
by
aknecht2
Browse files
Fixed stdout & stderr type handling. Fixed incorrect type in align.yaml. Fixed typo in config.
parent
28e76d80
Changes
4
Hide whitespace changes
Inline
Side-by-side
chipathlon/conf.py
View file @
f4bf8215
...
...
@@ -51,7 +51,7 @@ resources = {
argument_types
=
{
"argument"
:
[
"argument"
],
"file"
:
[
"file"
,
"stdout"
,
"stderr"
]
]
}
# param keys
param_keys
=
{
...
...
chipathlon/jobs/modules/align.yaml
View file @
f4bf8215
...
...
@@ -91,7 +91,7 @@ align:
type
:
file
outputs
:
-
align.sam
:
type
:
stdout
type
:
file
-
align.quality
:
type
:
stderr
paired[read_end]
:
...
...
@@ -120,7 +120,7 @@ align:
type
:
file
outputs
:
-
align.sam
:
type
:
stdout
type
:
file
-
align.quality
:
type
:
stderr
-
samtools_sam_to_bam
:
...
...
chipathlon/workflow_job.py
View file @
f4bf8215
...
...
@@ -197,16 +197,30 @@ class WorkflowJob(object):
key
,
index
=
arg_info
[
"default"
].
split
(
"."
)
arg_list
.
append
(
arg
)
# We only add the file object if the passed argument is
# has type == file
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"file"
]
if
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"file"
else
argument_map
[
key
][
int
(
index
)][
"value"
])
# has type == file. We don't want to process
# stdout / stderr arguments here.
if
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"file"
:
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"file"
])
elif
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"argument"
:
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"value"
])
else
:
print
"Error with argument '%s' for file %s. Check the yaml file."
%
(
arg
,
self
.
jobname
)
sys
.
exit
(
1
)
else
:
arg_list
.
append
(
"%s %s"
%
(
arg
,
arg_info
[
"default"
]))
else
:
if
not
isinstance
(
arg
,
bool
)
and
arg
[:
1
]
==
"$"
:
key
,
index
=
arg
.
split
(
"."
)
# We only add the file object if the passed argument is
# has type == file
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"file"
]
if
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"file"
else
argument_map
[
key
][
int
(
index
)][
"value"
])
# We only add the file object if the passed argument
# has type == file. We don't want to process
# stdout / stderr arguments here.
if
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"file"
:
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"file"
])
elif
argument_map
[
key
][
int
(
index
)][
"type"
]
==
"argument"
:
arg_list
.
append
(
argument_map
[
key
][
int
(
index
)][
"value"
])
else
:
print
"Error with argument '%s' for file %s. Check the yaml file."
%
(
arg
,
self
.
jobname
)
sys
.
exit
(
1
)
else
:
arg_list
.
append
(
arg
)
return
arg_list
chipathlon/workflow_module.py
View file @
f4bf8215
...
...
@@ -131,7 +131,7 @@ class WorkflowModule(object):
param_name
=
param_dict
.
keys
()[
0
]
param
=
param_dict
[
param_name
]
# Make sure param is one of the file types
if
param
[
"type"
]
in
conf
.
argument_types
[
"file"
]:
if
param
[
"type"
]
in
chipathlon
.
conf
.
argument_types
[
"file"
]:
if
param_name
not
in
[
x
[
"name"
]
for
x
in
param_list
]
and
param_name
not
in
[
x
[
"name"
]
for
x
in
output_files
]:
if
prefix
is
None
or
self
.
_get_full_name
(
prefix
,
markers
,
param_name
)
not
in
master_files
:
param_list
.
append
({
"name"
:
param_name
,
"type"
:
"file"
})
...
...
@@ -172,7 +172,7 @@ class WorkflowModule(object):
for
job_dict
in
job_info
[
param_type
]:
param_name
=
job_dict
.
keys
()[
0
]
param
=
job_dict
[
param_name
]
if
param
[
"type"
]
in
conf
.
argument_types
[
"file"
]:
if
param
[
"type"
]
in
chipathlon
.
conf
.
argument_types
[
"file"
]:
full_name
=
self
.
_get_full_name
(
prefix
,
markers
,
param_name
)
# If file is an output file, add to master_files
if
param_type
==
"outputs"
:
...
...
@@ -233,7 +233,7 @@ class WorkflowModule(object):
}
data
=
module_params
for
arg_params
,
param_key
in
zip
([
inputs
,
additional_files
],
[
"inputs"
,
"additional_files"
]):
for
file_dict
in
[
file_param
for
file_param
in
module_params
[
param_key
]
if
file_param
[
"type"
]
in
conf
.
argument_types
[
"file"
]]:
for
file_dict
in
[
file_param
for
file_param
in
module_params
[
param_key
]
if
file_param
[
"type"
]
in
chipathlon
.
conf
.
argument_types
[
"file"
]]:
file_name
=
file_dict
[
"name"
]
if
file_name
not
in
module_params
[
param_key
]:
valid_params
=
False
...
...
@@ -242,7 +242,7 @@ class WorkflowModule(object):
valid_params
=
False
msg
+=
"Error loading '%s' jobs. File with name '%s', value '%s', does not exist in master_files.
\n
"
%
(
self
.
name
,
file_name
,
arg_params
[
file_name
])
for
param_dict
in
module_params
[
param_key
]:
if
param_dict
[
"type"
]
in
conf
.
argument_types
[
"file"
]:
if
param_dict
[
"type"
]
in
chipathlon
.
conf
.
argument_types
[
"file"
]:
file_name
=
param_dict
[
"name"
]
if
file_name
not
in
arg_params
:
valid_params
=
False
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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