Commit 48c71870 authored by Ibouniyamine Nabihoudine's avatar Ibouniyamine Nabihoudine
Browse files

reorder parameters definition paragraphs

parent 64916978
...@@ -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 parameters</a></li> <li><a href="#parameters">Parameters</a></li>
<li><a href="#parameter_list">Parameter list</a></li> <li><a href="#input_parameters">Input parameters</a></li>
<li><a href="#inputs_and_outputs">Inputs and Outputs</a></li> <li><a href="#output_parameters">Output parameters</a></li>
</ul> </ul>
</li> </li>
<li><a href="#external_components" >External components</a> <li><a href="#external_components" >External components</a>
...@@ -189,10 +189,11 @@ self.add_output_file_list("sais", "sai files", ...@@ -189,10 +189,11 @@ 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>
<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> <li><a href="#parameters">Parameters</a></li>
<div id="parameters" class="subgroup">
<h2>Parameters</h2>
<h3>add_parameter() method</h3> <h3>add_parameter() method</h3>
<p> <p>
...@@ -317,6 +318,13 @@ self.add_output_file_list("sais", "sai files", ...@@ -317,6 +318,13 @@ self.add_output_file_list("sais", "sai files",
</tbody> </tbody>
</table> </table>
</div> </div>
<h3>add_parameter_list()</h3>
<p>This method description and options are the same as <code>add_parameter()</code>. See the previous
method for a description of available options.</p>
</div>
<div id="input_parameters" class="subgroup">
<h2>Input parameters</h2>
<h3>add_input_file() method</h3> <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 <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
...@@ -431,6 +439,17 @@ self.add_output_file_list("sais", "sai files", ...@@ -431,6 +439,17 @@ self.add_output_file_list("sais", "sai files",
</table> </table>
</div> </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 id="output_parameters" class="subgroup">
<h2>Output parameters</h2>
<h3>add_out_file() method</h3> <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 <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> to the component.</p>
...@@ -519,21 +538,6 @@ self.add_output_file_list("sais", "sai files", ...@@ -519,21 +538,6 @@ self.add_output_file_list("sais", "sai files",
</table> </table>
</div> </div>
</div>
<div id="parameter_list" class="subgroup">
<h2>Parameter list</h2>
<p>A parameter list is a container which contains a list of values. The methods used to add a parameter list are
<code>add_parameter_list()</code> and <code>add_input_file_list()</code>.</p>
<h3>add_parameter_list()</h3>
<p>This method description and options are the same as <code>add_parameter()</code>. See the previous
method for a description of available options.</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> <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 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> </div>
</section> </section>
<section id="external_components" class="group"> <section id="external_components" class="group">
......
...@@ -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 parameters</a></li> <li><a href="#parameters">Parameters</a></li>
<li><a href="#parameter_list">Parameter list</a></li> <li><a href="#input_parameters">Input parameters</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,14 +158,16 @@ class MyWorkflow (Workflow): ...@@ -158,14 +158,16 @@ 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>
<p>The methods used to add simple parameters are <code>add_parameter()</code> and <code>add_input_file()</code>.</p> <div id="parameters" class="subgroup">
<h2>Parameters</h2>
<h3>add_parameter() method</h3> <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()</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 method used to add parameters. In the next example, a parameter named <code>sequencer</code>
is added to the workflow. It has a list of choices and the default value is "HiSeq2000". is added to the workflow. It has a list of choices and the default value is "HiSeq2000".
</p> </p>
<div> <div>
...@@ -278,6 +280,32 @@ class MyWorkflow (Workflow): ...@@ -278,6 +280,32 @@ class MyWorkflow (Workflow):
</table> </table>
</div> </div>
<h3>add_parameter_list()</h3>
<p>The <code>add_parameter_list()</code> method has the exact same definition as <code>add_parameter()</code>, the only difference is that it
adds a container of parameters insteaed of a single paremeter element</p>
<div>
<pre class="pre-hl "><code class="python">def define_parameters(self, function="process"):
self.add_parameter_list("sequencers",
"The sequencer type.",
choices = ["HiSeq2000", "ILLUMINA","SLX","SOLEXA","454","UNKNOWN"],
default=["HiSeq2000"])
[ ... ]
def process(self) :
for sequencer in self.sequencers :
# do something
</code></pre>
</div>
</div>
<div id="input_parameters" class="subgroup">
<h2>Input parameters</h2>
<h3>add_input_file() method</h3> <h3>add_input_file() method</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 <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> to the workflow </p>
...@@ -390,26 +418,12 @@ class MyWorkflow (Workflow): ...@@ -390,26 +418,12 @@ class MyWorkflow (Workflow):
</table> </table>
</div> </div>
</div>
<div id="parameter_list" class="subgroup">
<h2>Parameter list</h2>
<p>
A parameter list is a container which contains a list of values. The methods used to add a parameter list are
<code>add_parameter_list()</code> and <code>add_input_file_list()</code>.
</p>
<h3>add_parameter_list()</h3>
<p>This method description and options are the same as <code>add_parameter()</code>. See the previous method for a description
of available options.</p>
<h3>add_input_file_list()</h3> <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 <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> of available options.</p>
</div> </div>
<div id="multiple_parameters" class="subgroup"> <div id="multiple_parameters" class="subgroup">
<h2>Multiple parameters</h2> <h2>Multiple parameters</h2>
......
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