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
genotoul-bioinfo
jflow
Commits
48c71870
Commit
48c71870
authored
Feb 27, 2015
by
Ibouniyamine Nabihoudine
Browse files
reorder parameters definition paragraphs
parent
64916978
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/jflow-core-component.html
View file @
48c71870
...
@@ -73,9 +73,9 @@
...
@@ -73,9 +73,9 @@
<li><a
href=
"#component"
>
Component definition
</a></li>
<li><a
href=
"#component"
>
Component definition
</a></li>
<li><a
href=
"#define_parameters"
>
Defining parameters
</a>
<li><a
href=
"#define_parameters"
>
Defining parameters
</a>
<ul
class=
"nav nav-stacked"
>
<ul
class=
"nav nav-stacked"
>
<li><a
href=
"#
simple_
parameters"
>
Simple p
arameters
</a></li>
<li><a
href=
"#parameters"
>
P
arameters
</a></li>
<li><a
href=
"#parameter
_list"
>
P
arameter
list
</a></li>
<li><a
href=
"#
input_
parameter
s"
>
Input p
arameter
s
</a></li>
<li><a
href=
"#
inputs_and_outputs"
>
Inputs and Output
s
</a></li>
<li><a
href=
"#
output_parameters"
>
Output parameter
s
</a></li>
</ul>
</ul>
</li>
</li>
<li><a
href=
"#external_components"
>
External components
</a>
<li><a
href=
"#external_components"
>
External components
</a>
...
@@ -189,11 +189,12 @@ self.add_output_file_list("sais", "sai files",
...
@@ -189,11 +189,12 @@ self.add_output_file_list("sais", "sai files",
pattern="{basename_woext}.sai", items=self.input_files)
</code></pre>
pattern="{basename_woext}.sai", items=self.input_files)
</code></pre>
</div>
</div>
<div
id=
"simple_parameters"
class=
"subgroup"
>
<h2>
Simple parameters
</h2>
<li><a
href=
"#parameters"
>
Parameters
</a></li>
<div
id=
"parameters"
class=
"subgroup"
>
<h2>
Parameters
</h2>
<p>
The methods used to add simple parameters are
<code>
add_parameter()
</code>
,
<code>
add_input_file()
</code>
and
<code>
add_output_file()
</code>
.
</p>
<h3>
add_parameter() method
</h3>
<h3>
add_parameter() method
</h3>
<p>
<p>
This method is the basic one used to add parameters. In the next example, a parameter named
<code>
sequencer
</code>
This method is the basic one used to add parameters. In the next example, a parameter named
<code>
sequencer
</code>
...
@@ -317,224 +318,227 @@ self.add_output_file_list("sais", "sai files",
...
@@ -317,224 +318,227 @@ self.add_output_file_list("sais", "sai files",
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<h3>
add_parameter_list()
</h3>
<h3>
add_input_file() method
</h3>
<p>
This method description and options are the same as
<code>
add_parameter()
</code>
. See the previous
<p>
To add an input file to the component, use the
<code>
add_input_file()
</code>
method. Like
<code>
add_parameter()
</code>
it adds a single parameter
method for a description of available options.
</p>
to the component.
</p>
</div>
<div
id=
"input_parameters"
class=
"subgroup"
>
<h2>
Input parameters
</h2>
<h3>
add_input_file() method
</h3>
<p>
To add an input file to the component, use the
<code>
add_input_file()
</code>
method. Like
<code>
add_parameter()
</code>
it adds a single parameter
to the component.
</p>
<h4>
Options
</h4>
<h4>
Options
</h4>
<p>
The two positional arguments
<code>
name
</code>
and
<code>
help
</code>
are always present.
Keyword arguments are not the same as
<code>
add_parameter()
</code>
</p>
<p>
The two positional arguments
<code>
name
</code>
and
<code>
help
</code>
are always present.
Keyword arguments are not the same as
<code>
add_parameter()
</code>
</p>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<div
class=
"table-responsive"
>
<thead>
<table
class=
"table table-bordered table-striped"
>
<tr
style=
"white-space:nowrap"
>
<thead>
<th>
Name
</th>
<tr
style=
"white-space:nowrap"
>
<th>
Type
</th>
<th>
Name
</th>
<th>
Required
</th>
<th>
Type
</th>
<th>
Default value
</th>
<th>
Required
</th>
<th>
Description
</th>
<th>
Default value
</th>
</tr>
<th>
Description
</th>
</thead>
</tr>
<tbody>
</thead>
<tr>
<tbody>
<td>
name
</td>
<tr>
<td>
str
</td>
<td>
name
</td>
<td>
true
</td>
<td>
str
</td>
<td>
None
</td>
<td>
true
</td>
<td>
The name of the parameter
</td>
<td>
None
</td>
</tr>
<td>
The name of the parameter
</td>
</tr>
<tr>
<td>
help
</td>
<td>
str
</td>
<td>
true
</td>
<td>
None
</td>
<td>
The help message prompted to the user.
</td>
</tr>
<tr>
<td>
default
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The path to the input file
</td>
</tr>
<tr>
<tr>
<td>
file_format
</td>
<td>
help
</td>
<td>
string
</td>
<td>
str
</td>
<td>
false
</td>
<td>
true
</td>
<td>
"any"
</td>
<td>
None
</td>
<td>
This describe the format of the inputfile. New file format can be defined in
<code>
formats.py
</code>
</td>
<td>
The help message prompted to the user.
</td>
</tr>
</tr>
<tr>
<td>
type
</td>
<td>
string
</td>
<td>
false
</td>
<td>
"inputfile"
</td>
<td>
The type of our file. It must be a value in ("inputfile", "localfile", "urlfile", "browsefile")
</td>
</tr>
<tr>
<td>
required
</td>
<td>
boolean
</td>
<td>
false
</td>
<td>
false
</td>
<td>
Wether or not the parameter can be ommitted.
</td>
</tr>
<tr>
<td>
flag
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The parameter command line flag (default is
<em>
"--name"
</em>
).
</td>
</tr>
<tr>
<td>
group
</td>
<td>
string
</td>
<td>
false
</td>
<td>
"default"
</td>
<td>
This is used to regroup a list of parameters in the command line and the GUI.
</td>
</tr>
<tr>
<td>
display_name
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The display name of the parameter.
</td>
</tr>
<tr>
<td>
cmd_format
</td>
<td>
string
</td>
<td>
false
</td>
<td>
""
</td>
<td>
The command format is the flag used in the command line for our parameter.
</td>
</tr>
<tr>
<td>
argpos
</td>
<td>
integer
</td>
<td>
false
</td>
<td>
-1
</td>
<td>
The position of the parameter in the command line.
</td>
</tr>
</tbody>
</table>
</div>
<h3>
add_out_file() method
</h3>
<p>
To add an output file, use the
<code>
add_input_file()
</code>
method. Like
<code>
add_parameter()
</code>
it adds a single parameter
to the component.
</p>
<h4>
Options
</h4>
<p>
The two positional arguments
<code>
name
</code>
and
<code>
help
</code>
are always present
</p>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<tr
style=
"white-space:nowrap"
>
<th>
Name
</th>
<th>
Type
</th>
<th>
Required
</th>
<th>
Default value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
name
</td>
<td>
str
</td>
<td>
true
</td>
<td>
None
</td>
<td>
The name of the parameter
</td>
</tr>
<tr>
<td>
help
</td>
<td>
str
</td>
<td>
true
</td>
<td>
None
</td>
<td>
The help message prompted to the user.
</td>
</tr>
<tr>
<td>
filename
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The expected name of the output file.
</td>
</tr>
<tr>
<tr>
<td>
file_format
</td>
<td>
default
</td>
<td>
string
</td>
<td>
string
</td>
<td>
false
</td>
<td>
false
</td>
<td>
"any"
</td>
<td>
None
</td>
<td>
This describe the format of the inputfile. New file format can be defined in
<code>
formats.py
</code>
</td>
<td>
The path to the input file
</td>
</tr>
</tr>
<tr>
<tr>
<td>
group
</td>
<td>
file_format
</td>
<td>
string
</td>
<td>
string
</td>
<td>
false
</td>
<td>
false
</td>
<td>
"default"
</td>
<td>
"any"
</td>
<td>
This is used to regroup a list of parameters in the command line and the GUI.
</td>
<td>
This describe the format of the inputfile. New file format can be defined in
<code>
formats.py
</code>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
display_name
</td>
<td>
type
</td>
<td>
string
</td>
<td>
string
</td>
<td>
false
</td>
<td>
false
</td>
<td>
None
</td>
<td>
"inputfile"
</td>
<td>
The display name of the parameter.
</td>
<td>
The type of our file. It must be a value in ("inputfile", "localfile", "urlfile", "browsefile")
</td>
</tr>
</tr>
<tr>
<tr>
<td>
cmd_format
</td>
<td>
required
</td>
<td>
string
</td>
<td>
boolean
</td>
<td>
false
</td>
<td>
false
</td>
<td>
""
</td>
<td>
false
</td>
<td>
The command format is the flag used in the command line for our parameter.
</td>
<td>
Wether or not the parameter can be ommitted.
</td>
</tr>
</tr>
<tr>
<tr>
<td>
argpos
</td>
<td>
flag
</td>
<td>
integer
</td>
<td>
string
</td>
<td>
false
</td>
<td>
false
</td>
<td>
-1
</td>
<td>
None
</td>
<td>
The position of the parameter in the command line.
</td>
<td>
The parameter command line flag (default is
<em>
"--name"
</em>
).
</td>
</tr>
</tr>
</tbody>
<tr>
</table>
<td>
group
</td>
</div>
<td>
string
</td>
<td>
false
</td>
<td>
"default"
</td>
<td>
This is used to regroup a list of parameters in the command line and the GUI.
</td>
</tr>
<tr>
<td>
display_name
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The display name of the parameter.
</td>
</tr>
<tr>
<td>
cmd_format
</td>
<td>
string
</td>
<td>
false
</td>
<td>
""
</td>
<td>
The command format is the flag used in the command line for our parameter.
</td>
</tr>
<tr>
<td>
argpos
</td>
<td>
integer
</td>
<td>
false
</td>
<td>
-1
</td>
<td>
The position of the parameter in the command line.
</td>
</tr>
</tbody>
</table>
</div>
<h3>
add_input_file_list()
</h3>
<p>
This method description and options are the same as
<code>
add_input_file()
</code>
. See the previous
method for a description of available options.
</p>
</div>
</div>
<div
id=
"parameter_list"
class=
"subgroup"
>
<h2>
Parameter list
</h2>
<div
id=
"output_parameters"
class=
"subgroup"
>
<p>
A parameter list is a container which contains a list of values. The methods used to add a parameter list are
<h2>
Output parameters
</h2>
<code>
add_parameter_list()
</code>
and
<code>
add_input_file_list()
</code>
.
</p>
<h3>
add_parameter_list()
</h3>
<h3>
add_out_file() method
</h3>
<p>
This method description and options are the same as
<code>
add_parameter()
</code>
. See the previous
<p>
To add an output file, use the
<code>
add_input_file()
</code>
method. Like
<code>
add_parameter()
</code>
it adds a single parameter
method for a description of available options.
</p>
to the component.
</p>
<h3>
add_input_file_list()
</h3>
<p>
This method description and options are the same as
<code>
add_input_file()
</code>
. See the previous
method for a description of available options.
</p>
<h3>
add_output_file_list()
</h3>
<h4>
Options
</h4>
<p>
The two positional arguments
<code>
name
</code>
and
<code>
help
</code>
are always present
</p>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<tr
style=
"white-space:nowrap"
>
<th>
Name
</th>
<th>
Type
</th>
<th>
Required
</th>
<th>
Default value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
name
</td>
<td>
str
</td>
<td>
true
</td>
<td>
None
</td>
<td>
The name of the parameter
</td>
</tr>
<tr>
<td>
help
</td>
<td>
str
</td>
<td>
true
</td>
<td>
None
</td>
<td>
The help message prompted to the user.
</td>
</tr>
<tr>
<td>
filename
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The expected name of the output file.
</td>
</tr>
<tr>
<td>
file_format
</td>
<td>
string
</td>
<td>
false
</td>
<td>
"any"
</td>
<td>
This describe the format of the inputfile. New file format can be defined in
<code>
formats.py
</code>
</td>
</tr>
<tr>
<td>
group
</td>
<td>
string
</td>
<td>
false
</td>
<td>
"default"
</td>
<td>
This is used to regroup a list of parameters in the command line and the GUI.
</td>
</tr>
<tr>
<td>
display_name
</td>
<td>
string
</td>
<td>
false
</td>
<td>
None
</td>
<td>
The display name of the parameter.
</td>
</tr>
<tr>
<td>
cmd_format
</td>
<td>
string
</td>
<td>
false
</td>
<td>
""
</td>
<td>
The command format is the flag used in the command line for our parameter.
</td>
</tr>
<tr>
<td>
argpos
</td>
<td>
integer
</td>
<td>
false
</td>
<td>
-1
</td>
<td>
The position of the parameter in the command line.
</td>
</tr>
</tbody>
</table>
</div>
<h3>
add_output_file_list()
</h3>
<p>
This method adds a list of output file to the component. It has two positional options
<code>
name
</code>
<p>
This method adds a list of output file to the component. It has two positional options
<code>
name
</code>
and
<code>
help
</code>
and keyword options.
</p>
and
<code>
help
</code>
and keyword options.
</p>
...
@@ -762,19 +766,8 @@ self.add_output_file_list("sais", "sai files",
...
@@ -762,19 +766,8 @@ self.add_output_file_list("sais", "sai files",
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>
</div>
<div
id=
"inputs_and_outputs"
class=
"subgroup"
>
<h2>
Inputs and outputs
</h2>
<p>
The link between two components in a workflow is made using input and output files.
</p>
</div>
</section>
</section>
<section
id=
"external_components"
class=
"group"
>
<section
id=
"external_components"
class=
"group"
>
...
...
docs/jflow-core-workflow.html
View file @
48c71870
...
@@ -72,8 +72,8 @@
...
@@ -72,8 +72,8 @@
<li><a
href=
"#workflow"
>
The Workflow class
</a></li>
<li><a
href=
"#workflow"
>
The Workflow class
</a></li>
<li><a
href=
"#define_parameters"
>
Define parameters
</a>
<li><a
href=
"#define_parameters"
>
Define parameters
</a>
<ul
class=
"nav nav-stacked"
>
<ul
class=
"nav nav-stacked"
>
<li><a
href=
"#
simple_
parameters"
>
Simple p
arameters
</a></li>
<li><a
href=
"#parameters"
>
P
arameters
</a></li>
<li><a
href=
"#parameter
_list"
>
P
arameter
list
</a></li>
<li><a
href=
"#
input_
parameter
s"
>
Input p
arameter
s
</a></li>
<li><a
href=
"#multiple_parameters"
>
Multiple parameters
</a></li>
<li><a
href=
"#multiple_parameters"
>
Multiple parameters
</a></li>
<li><a
href=
"#exclusion_rules"
>
Exclusion rules
</a></li>
<li><a
href=
"#exclusion_rules"
>
Exclusion rules
</a></li>
</ul>
</ul>
...
@@ -158,257 +158,271 @@ class MyWorkflow (Workflow):
...
@@ -158,257 +158,271 @@ class MyWorkflow (Workflow):
<span
class=
"glyphicon glyphicon-exclamation-sign"
aria-hidden=
"true"
></span>
<span
class=
"glyphicon glyphicon-exclamation-sign"
aria-hidden=
"true"
></span>
The operator
<code>
is
</code>
is not supported to evaluate a parameter, the operator
<code>
==
</code>
must be prefered.
The operator
<code>
is
</code>
is not supported to evaluate a parameter, the operator
<code>
==
</code>
must be prefered.
<div
id=
"simple_parameters"
class=
"subgroup"
>
<h2>
Simple parameters
</h2>
<div
id=
"parameters"
class=
"subgroup"
>
<h2>
Parameters
</h2>
<p>
The methods used to add simple parameters are
<code>
add_parameter()
</code>
and
<code>
add_input_file()
</code>
.
</p>
<p>
Each parameter can be added as a sigle element or as list of parameters. Use
<code>
add_parameter()
</code>
method to add a single
parameter, and
<code>
add_parameter_list()
</code>
to add a list of parameters.
</p>
<h3>
add_parameter() method
</h3>
<p>
<h3>
add_parameter()
</h3>
This method is the basic one used to add parameters. In the next example, a parameter named
<code>
sequencer
</code>
<p>
is added to the workflow. It has a list of choices and the default value is "HiSeq2000".
This method is the basic method used to add parameters. In the next example, a parameter named
<code>
sequencer
</code>
</p>
is added to the workflow. It has a list of choices and the default value is "HiSeq2000".
<div>
</p>
<pre
class=
"pre-hl "
><code
class=
"python"
>
def define_parameters(self, function="process"):
<div>
<pre
class=
"pre-hl "
><code
class=
"python"
>
def define_parameters(self, function="process"):
self.add_parameter("sequencer",
self.add_parameter("sequencer",
"The sequencer type.",
"The sequencer type.",
choices = ["HiSeq2000", "ILLUMINA","SLX","SOLEXA","454","UNKNOWN"],
choices = ["HiSeq2000", "ILLUMINA","SLX","SOLEXA","454","UNKNOWN"],
default="HiSeq2000")
</code></pre>
default="HiSeq2000")
</code></pre>
</div>
</div>
<h4>
Options
</h4>
<h4>
Options
</h4>
<p>
There are two positional argument : name and help. All other options are keyword options
</p>
<p>
There are two positional argument : name and help. All other options are keyword options
</p>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<thead>
<tr>
<tr>
<th>
Name
</th>
<th>
Name
</th>
<th>
Type
</th>
<th>
Type
</th>
<th>
Required
</th>
<th>
Required
</th>
<th>
Default value
</th>
<th>
Default value
</th>
<th>
Description
</th>
<th>
Description
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td>
name
</td>
<td>
name
</td>
<td>
str
</td>
<td>
str
</td>
<td>
true
</td>
<td>
true
</td>
<td>
None
</td>
<td>
None
</td>
<td>
The name of the parameter. The parameter will then be available
<td>
The name of the parameter. The parameter will then be available
in the workflow as
<code>
self.parameter_name
</code>
.
</td>
in the workflow as
<code>
self.parameter_name
</code>
.
</td>
</tr>
</tr>
<tr>
<tr>
<td>
help
</td>
<td>
help
</td>
<td>
str
</td>
<td>
str
</td>
<td>
true
</td>
<td>
true
</td>
<td>
None
</td>
<td>
None
</td>
<td>
The help message pronpted to the user.
</td>
<td>
The help message pronpted to the user.
</td>
</tr>
</tr>
<tr>
<td>
default
</td>
<td>
-
</td>
<td>
false
</td>
<td>
None
</td>
<td>
This is the default value of our parameter.
</td>
</tr>
<tr>
<td>
type
</td>
<td>
*
</td>
<td>
false
</td>
<td>
"str"
</td>
<td>
The type to which our argument will be converted. All default python types are available (int, str, float, bool). User can define new
types in
<em>
types.py
</em>
file.
</td>
</tr>