RAPPEL : Opération de maintenance > ForgeMIA indisponible le 20 Janvier entre 7h et 12h

Commit 7bbcdd80 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

workflow inputs ok

parent 96bd7da2
......@@ -160,11 +160,12 @@ class MyWorkflow (Workflow):
<div id="parameters" class="subgroup">
<h2>Parameters</h2>
<p>Each parameter can be added to handle a single element or a list of elements. Thus, the <code>add_parameter()</code> method can be used to force
<p>Parameters can be added to handle a single element or a list of elements. Thus, the <code>add_parameter()</code> method can be used to force
the final user to provide one and only one value, where the <code>add_parameter_list()</code> method allows the final user to give as many values he
wants.</p>
<h3>add_parameter()</h3>
<h4>Example</h4>
<p>
In the following example, a parameter named <code>sequencer</code>
is added to the workflow. It has a list of choices and the default value is "HiSeq2000".
......@@ -179,7 +180,7 @@ class MyWorkflow (Workflow):
<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">
<table class="table table-bordered table-striped">
......@@ -249,7 +250,7 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>None</td>
<td>The command line flag (default is <em>"--name"</em>).</td>
<td>The command line flag (if the value is None, the flag will be <em>"--name"</em>).</td>
</tr>
<tr>
......@@ -293,14 +294,27 @@ class MyWorkflow (Workflow):
<div id="input_parameters" class="subgroup">
<h2>Inputs</h2>
<p>Just like for parameters, inputs can be added to handle a single file or a list of files. Thus, the <code>add__input_file()</code> method can be used to force
the final user to provide one and only one file, where the <code>add__input_file_list()</code> method allows the final user to give as many files he
wants.</p>
<h3>add_input_file()</h3>
<p>To add an input file to your workflow, use the <code>add_input_file()</code> method. Like <code>add_parameter()</code> it adds a single parameter
to the workflow </p>
<h4>Example</h4>
<p>
In the following example, an input named <code>reads</code>
is added to the workflow. The provided file is required and should be in fastq format. No file size limitation is specified.
</p>
<div>
<pre class="pre-hl "><code class="python">def define_parameters(self, function="process"):
self.add_input_file_list("reads",
"Which read files should be used",
file_format="fastq",
required=True)</code></pre>
</div>
<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>There are two positional argument : name and help. All other options are keyword options. </p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
......@@ -319,7 +333,8 @@ class MyWorkflow (Workflow):
<td>str</td>
<td>true</td>
<td>None</td>
<td>The name of the parameter</td>
<td>The name of the parameter. The parameter value is accessible
within the workflow object through the attribute named <code>self.parameter_name</code>.</td>
</tr>
<tr>
......@@ -327,7 +342,7 @@ class MyWorkflow (Workflow):
<td>str</td>
<td>true</td>
<td>None</td>
<td>The help message pronpted to the user.</td>
<td>The parameter help message.</td>
</tr>
<tr>
......@@ -335,7 +350,7 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>None</td>
<td>The path to the input file</td>
<td>The default path value.</td>
</tr>
<tr>
......@@ -343,7 +358,8 @@ class MyWorkflow (Workflow):
<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>
<td>The file format is checked before running the workflow. To create customized format,
refere to the <a href="./jflow-format.html">Add a file format</a> documentation.</td>
</tr>
<tr>
......@@ -351,7 +367,12 @@ class MyWorkflow (Workflow):
<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>
<td>The type can be "inputfile", "localfile", "urlfile" or "browsefile". An "inputfile" allows the
final user to provide a "localfile" or an "urlfile" or a "browsefile". A "localfile" restricts the final
user to provide a path to a file visible by jflow. An "urlfile" only permits the final user to give an
URL as input, where a "browsefile" force the final user to upload a file from its own computer. This last
option is only available from the GUI and is considered as a "localfile" from the command line. All the
uploading process is handled by jflow.</td>
</tr>
<tr>
......@@ -367,7 +388,7 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>None</td>
<td>The parameter command line flag (default is <em>"--name"</em>).</td>
<td>The command line flag (if the value is None, the flag will be <em>"--name"</em>).</td>
</tr>
<tr>
......@@ -375,7 +396,7 @@ class MyWorkflow (Workflow):
<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>
<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
</tr>
<tr>
......@@ -383,7 +404,7 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>None</td>
<td>The display name of the parameter.</td>
<td>The parameter name that should be displayed on the final form.</td>
</tr>
<tr>
......@@ -391,7 +412,8 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>None</td>
<td>This parameter is a subparameter of add_to.</td>
<td>If this parameter is part of a multiple parameter, <code>add_to</code> allows to define to which "parent" parameter it should be
linked to.</td>
</tr>
<tr>
......@@ -399,15 +421,19 @@ class MyWorkflow (Workflow):
<td>string</td>
<td>false</td>
<td>"0"</td>
<td>This is the size limit for the file. Units notation must be in ("bytes", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb") </td>
<td>Which maximum file size is allowed. If the value is "0", the file size allowed is unlimited. The given value should
also provides the file size units between "bytes", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb" and "Zb". A value of 10Mb will
restrict the user to upload a file of 10 Mega Bytes.</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>
<p>This method takes the same arguments as <code>add_input_file()</code>. However, adding this parameter,
the final user will be allowed to provide multiple files and the object attribut <code>self.parameter_name</code> will be
settled as a Python list.</p>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment