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
genotoul-bioinfo
jflow
Commits
a321bd8b
Commit
a321bd8b
authored
Oct 08, 2013
by
Jerome Mariette
Browse files
add display_name option
parent
ac12210e
Changes
5
Hide whitespace changes
Inline
Side-by-side
bin/jflow_server.py
View file @
a321bd8b
...
...
@@ -117,7 +117,8 @@ class JFlowServer (object):
"choices"
:
param
.
choices
,
"action"
:
param
.
action
,
"type"
:
param
.
get_type
(),
"name"
:
param
.
name
})
"name"
:
param
.
name
,
"display_name"
:
param
.
display_name
})
workflows
.
append
({
"name"
:
instance
.
name
,
"help"
:
instance
.
description
,
"class"
:
instance
.
__class__
.
__name__
,
...
...
src/jflow/parameter.py
View file @
a321bd8b
...
...
@@ -72,7 +72,7 @@ class Parameter(object):
"""
def
__init__
(
self
,
name
,
help
,
flag
,
default
=
None
,
type
=
types
.
StringType
,
choices
=
None
,
required
=
False
,
action
=
"store"
,
sub_parameters
=
[],
group
=
"default"
):
required
=
False
,
action
=
"store"
,
sub_parameters
=
[],
group
=
"default"
,
display_name
=
None
):
self
.
name
=
name
self
.
flag
=
flag
...
...
@@ -81,6 +81,9 @@ class Parameter(object):
self
.
nargs
=
None
self
.
sub_parameters
=
sub_parameters
self
.
group
=
group
if
display_name
==
None
:
self
.
display_name
=
name
else
:
self
.
display_name
=
display_name
if
len
(
self
.
sub_parameters
)
>
0
:
self
.
nargs
=
"+"
...
...
src/jflow/workflow.py
View file @
a321bd8b
...
...
@@ -328,6 +328,7 @@ class Workflow(threading.Thread):
else
:
params
[
cparam
][
ckey
]
=
cvalue
if
cparam
not
in
param_order
:
param_order
.
append
(
cparam
)
for
param_name
in
param_order
:
sub_params
,
current_params
,
sub_objs
=
{},
{},
[]
for
param
in
params
[
param_name
]:
...
...
@@ -338,7 +339,10 @@ class Workflow(threading.Thread):
else
:
sub_params
[
sub_params_values
[
0
]][
sub_params_values
[
1
]]
=
params
[
param_name
][
param
]
else
:
if
param
==
"name"
:
current_params
[
"display_name"
]
=
params
[
param_name
][
"name"
]
else
:
current_params
[
param
]
=
params
[
param_name
][
param
]
current_params
[
param
]
=
params
[
param_name
][
param
]
current_params
[
"name"
]
=
param_name
if
sub_order
.
has_key
(
param_name
):
for
sub_param
in
sub_order
[
param_name
]:
sub
=
Parameter
(
**
sub_params
[
sub_param
])
...
...
@@ -349,7 +353,8 @@ class Workflow(threading.Thread):
except
:
pass
# finally add the metadata parameter
metadata
=
Parameter
(
name
=
"metadata"
,
flag
=
"--metadata"
,
help
=
"Which metadata should be linked to this workflow"
,
action
=
"append"
)
metadata
=
Parameter
(
name
=
"metadata"
,
flag
=
"--metadata"
,
help
=
"Which metadata should be linked to this workflow"
,
action
=
"append"
,
display_name
=
"Metadata"
)
parameters
.
append
(
metadata
)
return
[
reader
.
get
(
"global"
,
"name"
),
reader
.
get
(
"global"
,
"description"
),
...
...
src/js/jflow-wfform.js
View file @
a321bd8b
...
...
@@ -208,7 +208,7 @@
// it the parameter has ne already been settled
'
{{if Object.keys(parameters).indexOf(param.name) == -1 }}
'
,
'
<div class="control-group">
'
,
'
<label class="control-label">${param.name}</label>
'
,
'
<label class="control-label">${param.
display_
name}</label>
'
,
'
<div class="controls">
'
,
// if it's a multiple choice parameter, add a select
'
{{if param.choices}}
'
,
...
...
workflows/alignment/workflow.properties
View file @
a321bd8b
...
...
@@ -31,18 +31,18 @@ description = align reads against a reference genome
# .action [store]: the basic type of action to be taken (store|append)
#
[parameters]
read_1.name
=
r
ead
_
1
read_1.name
=
R
ead
1
read_1.flag
=
--read-1
read_1.help
=
Which read1 files should be used
read_1.required
=
True
read_1.action
=
append
read_2.name
=
r
ead
_
2
read_2.name
=
R
ead
2
read_2.flag
=
--read-2
read_2.help
=
Which read2 files should be used (if single end, leave empty)
read_2.action
=
append
reference_genome.name
=
r
eference
_
genome
reference_genome.name
=
R
eference
genome
reference_genome.flag
=
--reference-genome
reference_genome.help
=
Which genome should the read being align on
reference_genome.required
=
True
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