Maintenance - Mise à jour mensuelle Lundi 7 Décembre 2021 entre 7h00 et 9h00

jflow_core_workflow.html 39.9 KB
Newer Older
1
2
<!DOCTYPE html>
<html lang="en">
Jerome Mariette's avatar
Jerome Mariette committed
3
4
5
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
6

Jerome Mariette's avatar
Jerome Mariette committed
7
8
9
10
11
12
13
14
15
    <title>Jflow</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap theme -->
    <link href="css/bootstrap-theme.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/theme.css" rel="stylesheet">
16

Philippe Bardou's avatar
Philippe Bardou committed
17
18
19
	<!--  Highlight code -->
	<link href="css/tomorrow-night-eighties.css" rel="stylesheet">

Jerome Mariette's avatar
Jerome Mariette committed
20
21
22
23
24
25
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
26

Jerome Mariette's avatar
Jerome Mariette committed
27
28
29
30
31
32
33
34
35
36
37
38
  <body role="document">
  
    <!-- Fixed navbar -->
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
Jerome Mariette's avatar
Jerome Mariette committed
39
          <a class="navbar-brand" href="./index.html">Jflow</a>
Jerome Mariette's avatar
Jerome Mariette committed
40
41
42
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
Jerome Mariette's avatar
Jerome Mariette committed
43
44
45
            <li><a href="./index.html">About</a></li>
            <li><a href="./jflow_install.html">Install</a></li>
            <li><a href="./jflow_quickstart.html">Quick start</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
46
47
            <li class="dropdown active">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation<span class="caret"></span></a>
Jerome Mariette's avatar
Jerome Mariette committed
48
              <ul class="dropdown-menu" role="menu">
Jerome Mariette's avatar
Jerome Mariette committed
49
50
51
52
53
                <li class="active"><a href="./jflow_core_workflow.html">Add a workflow</a></li>
                <li><a href="./jflow_core_component.html">Add a component</a></li>
                <li><a href="./jflow_plugin.html">Plugin insertion</a></li>
                <li><a href="./jflow_type.html">Add a data type</a></li>
                <li><a href="./jflow_format.html">Add a file format</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
54
                <li><a href="./jflow_rule.html">Add a rule</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
55
                <li><a href="./jflow_advanced_configuration.html">Advanced configuration</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
56
57
              </ul>
            </li>
Jerome Mariette's avatar
Jerome Mariette committed
58
			<li><a href="./example1.html">Example</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
59
60
61
62
63
			<li><a href="mailto:support.genopole@toulouse.inra.fr">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
64

Jerome Mariette's avatar
Jerome Mariette committed
65
    <div class="container">
Philippe Bardou's avatar
Philippe Bardou committed
66
      <div class="row">
Philippe Bardou's avatar
Philippe Bardou committed
67
68
69
        <!--Nav Bar -->
	    <nav class="col-xs-3 bs-docs-sidebar">
	        <ul id="sidebar" class="nav nav-stacked fixed">
Jerome Mariette's avatar
Jerome Mariette committed
70
71
		        <li><a href="#what" class="active">What is a workflow</a></li>
		        <li><a href="#workflow-architecture">Where to add a new workflow</a></li>
72
		        <li><a href="#workflow" >The Workflow class</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
73
74
		       	<li><a href="#define_parameters">Define parameters</a>
			       	<ul class="nav nav-stacked">
75
			       		<li><a href="#parameters">Parameters</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
76
			       		<li><a href="#input_parameters">Inputs</a></li>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
77
			       		<li><a href="#multiple_parameters">Multiple parameters</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
78
79
80
	                </ul>
                </li>
				<li><a href="#process">Process</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
81
82
83
84
				<li><a href="#other_methods">Other methods</a>
				  	<ul class="nav nav-stacked">
				        <li><a href="#pre_process">Pre process</a></li>
						<li><a href="#post_process">Post process</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
85
86
87
						<li><a href="#set_to_address">Set to address</a></li>
						<li><a href="#set_subject">Set subject</a></li>
						<li><a href="#set_message">Set message</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
88
						<li><a href="#get_resource">Get resource</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
89
90
					</ul>
				</li>
Philippe Bardou's avatar
Philippe Bardou committed
91
92
93
	        </ul>
   	    </nav>
   	 
Jerome Mariette's avatar
Jerome Mariette committed
94
        <div class="col-xs-12 col-sm-9">
Jerome Mariette's avatar
Jerome Mariette committed
95
96
97
98
99
100
101
102
        
           	<section id="what" class="group">
		    	<h1 class="page-header">What is a workflow</h1>
	    		<p>A workflow is a collection of <a href="./jflow-core-component.html">components</a>. In jflow, it is represented by a Python class
	    			inerhiting from <code>jflow.workflow.Workflow</code>. It lists all the inputs and parameters that should be requested to 
	    			the final user and build the execution process by adding components and linking them to each others.</p>
	    	</section>
        
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
103
        	<section id="workflow-architecture" class="group">
Philippe Bardou's avatar
Philippe Bardou committed
104
		    	<h1 class="page-header">Where to add a new workflow</h1>
105
106
		    	<p>New wokflow must be added as a new python package in the <code>workflows</code> package. The implementation of
		    	a workflows must be written in the package <code>__init__.py</code> file. The developper can also create: </p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
107
		    	<ul>
108
109
110
		    		<li>a <code>components</code> package, where all the workflow specific components can be stored,</li>
		    		<li>a <code>lib</code> package to import specific libraries within its workflow,</li>
		    		<li>a <code>bin</code> folder with the binaries used in the workflow.</li>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
111
112
		    	</ul>
		    	
Philippe Bardou's avatar
Philippe Bardou committed
113
		    	<pre class="pre-hl "><code class="ini">jflow/
Philippe Bardou's avatar
Philippe Bardou committed
114
115
116
117
├── bin/
├── docs/
├── src/
├── workflows/
Philippe Bardou's avatar
Philippe Bardou committed
118
119
120
121
122
│   ├── myworkflow/       [ the new workflow package ]
│   │   ├── components/   [ specific components ]
│   │   ├── lib/          [ specific libraries ]
│   │   ├── bin/          [ specific binairies ]
│   │   └── __init__.py   [ the workflow implementation ]
Philippe Bardou's avatar
Philippe Bardou committed
123
124
125
126
127
128
129
│   ├── components/
│   ├── extparsers/
│   ├── __init__.py
│   ├── formats.py
│   └── types.py
├── applications.properties
└── README</code></pre>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
130
131
		    </section>   
     
Philippe Bardou's avatar
Philippe Bardou committed
132
        	<section id="workflow" class="group">
133
134
		    	<h1 class="page-header">The Workflow class</h1>
		    	<p>In jflow, a workflow is a class defined in the <code>__init__.py</code> file. In order to add a new workflow, the developper has to: </p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
135
		    	
Philippe Bardou's avatar
Philippe Bardou committed
136
		    	<ul>
Jerome Mariette's avatar
Jerome Mariette committed
137
			    	<li>implement a class inheriting from the <code>jflow.workflow.Workflow</code> class,</li>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
138
					<li>overload the <code>get_description()</code> method to provide to the final user a description of the workflow,</li>
139
140
141
					<li>overload the <code>define_parameters()</code> method to add the workflow inputs and parameters,</li>
					<li>overload the <code>process()</code> method by adding components and setting their arguments,</li>
					<li>link the components inputs and outputs.</li>
Philippe Bardou's avatar
Philippe Bardou committed
142
				</ul>
143
				<p>The class skeleton is given by</p>
Philippe Bardou's avatar
Philippe Bardou committed
144
			    <div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
145
			    	<pre class="pre-hl "><code class="python">from jflow.workflow import Workflow
Jerome Mariette's avatar
Jerome Mariette committed
146

147
class MyWorkflow (Workflow):
Philippe Bardou's avatar
Philippe Bardou committed
148
149

    def get_description(self):
150
        return "a description"
Philippe Bardou's avatar
Philippe Bardou committed
151
152

    def define_parameters(self, function="process"):
153
        # define the parameters
Philippe Bardou's avatar
Philippe Bardou committed
154
155

    def process(self):
156
        # add and link the components</code></pre>
Philippe Bardou's avatar
Philippe Bardou committed
157
			    </div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
158
			    
Jerome Mariette's avatar
Jerome Mariette committed
159
160
			</section>

Philippe Bardou's avatar
Philippe Bardou committed
161
			<section id="define_parameters" class="group">
Philippe Bardou's avatar
Philippe Bardou committed
162
		    	<h1 class="page-header">Define parameters</h1>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
163
				<p>
Jerome Mariette's avatar
Jerome Mariette committed
164
					The <code>define_parameters()</code> method is used to add workflow parameters and inputs. To do so, several methods are available. 
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
165
					Once defined, the new parameters are available as object attibuts, thus they are accessible through <code>self.parameter_name</code>.
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
166
				</p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
167
				<p>
168
					Several types of parameters can be added, all described in the following sections. All have two required positional 
Jerome Mariette's avatar
Jerome Mariette committed
169
170
					arguments: <code>name</code> and <code>help</code>. The other arguments are optional and can be given to the method by using their 
					keywords.
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
171
				</p>
Philippe Bardou's avatar
Philippe Bardou committed
172
173
174
175
				<div class="alert alert-info" role="alert">
					<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.
				</div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
176
				
177
178
				<div id="parameters" class="subgroup">
					<h2>Parameters</h2>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
179
					
Jerome Mariette's avatar
Jerome Mariette committed
180
					<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 
Jerome Mariette's avatar
Jerome Mariette committed
181
182
					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>
183
184
					
					<h3>add_parameter()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
185
						<h4>Example</h4>
186
						<p>
Jerome Mariette's avatar
Jerome Mariette committed
187
							In the following example, a parameter named <code>sequencer</code> 
188
189
190
							is added to the workflow. It has a list of choices and the default value is "HiSeq2000".
						</p>
				    	<div>
Jerome Mariette's avatar
Jerome Mariette committed
191
192
193
194
				    		<pre class="pre-hl "><code class="python">self.add_parameter("sequencer",
    		   "The sequencer type.", 
    		   choices = ["HiSeq2000", "ILLUMINA","SLX","SOLEXA","454","UNKNOWN"], 
    		   default="HiSeq2000")</code></pre>
195
196
197
				    	</div>
						
						<h4>Options</h4>					
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
198
			    	
Jerome Mariette's avatar
Jerome Mariette committed
199
			    			<p>There are two positional arguments: <code>name</code> and <code>help</code>. All other options are keyword options</p>
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
					    	
							<div class="table-responsive">
								<table class="table table-bordered table-striped">
									<thead>
										<tr>
											<th>Name</th>
											<th>Type</th>
											<th>Required</th>
											<th>Default value</th>
											<th>Description</th>
										</tr>
									</thead>
									<tbody>
										<tr>
											<td>name</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
215
											<td>string</td>
216
217
											<td>true</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
218
219
											<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>
220
221
222
223
										</tr>
										
										<tr>
											<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
224
											<td>string</td>
225
226
											<td>true</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
227
											<td>The parameter help message.</td>
228
										</tr>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
229
									
230
231
232
233
234
										<tr>
											<td>default</td>
											<td>-</td>
											<td>false</td>
											<td>None</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
235
											<td>The default parameter value. It's type depends on the parameter type.</td>
236
237
238
239
										</tr>
										
										<tr>
											<td>type</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
240
											<td>string</td>
241
242
											<td>false</td>
											<td>"str"</td>
Jerome Mariette's avatar
Jerome Mariette committed
243
244
245
											<td>The parameter type. The value provided by the final user will be casted and checked against this type. 
											All built-in Python types are available "int", "str", "float", "bool", "date", ... To create customized types, 
											refere to the <a href="./jflow-type.html">Add a data type</a> documentation.</td>
246
247
248
249
250
251
										</tr>
										
										<tr>
											<td>choices</td>
											<td>list</td>
											<td>false</td>
Jerome Mariette's avatar
Jerome Mariette committed
252
253
											<td>[]</td>
											<td>A list of the allowed values.</td>
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
										</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>
Jerome Mariette's avatar
Jerome Mariette committed
269
											<td>The command line flag (if the value is None, the flag will be <code>--name</code>).</td>
270
271
272
273
274
275
276
										</tr>
										
										<tr>
											<td>group</td>
											<td>string</td>
											<td>false</td>
											<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
277
											<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
278
279
280
281
282
283
284
										</tr>
										
										<tr>
											<td>display_name</td>
											<td>string</td>
											<td>false</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
285
											<td>The parameter name that should be displayed on the final form.</td>
286
287
288
289
290
291
292
										</tr>
										
										<tr>
											<td>add_to</td>
											<td>string</td>
											<td>false</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
293
294
											<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>
295
										</tr>
296
297
298
299
300
301
302
303
304

										<tr>
											<td>rules</td>
											<td>string</td>
											<td>false</td>
											<td>None</td>
											<td>Define custom rules on the parameter. Rules are separated by a ";"<br/>
												Available rules:<br/>
												<ul>
Jerome Mariette's avatar
Jerome Mariette committed
305
306
307
308
													<li><strong>Exclude:</strong> if the parameter is provided by the user, the specified parameters 
													are disabled (<code>Exclude=param1,param2,...</code>).<br/>
													<li><strong>ToBeRequired:</strong> the specified parameters are required if the current one is 
													provided by the user (<code>ToBeRequired=param1,param2,...</code>).<br/>
Floreal Cabanettes's avatar
Floreal Cabanettes committed
309
310
311
312
													<li><strong>RequiredIf:</strong> parameter is required only if other parameters have (or have not) some values.<br/>
													<em>Syntax: RequiredIf?(ANY|ALL)[param_1=value1,param_2!=value2,...] (all conditions or any condition)</em><br/>
														Special values: * for any value of the parameter (not empty), None for not given (or empty)<br/>
													Example: RequiredIf?ANY[adapter_1!="AATGC",adapter_2=*,gtf_file=None]</li>
313
314
													<li><strong>DisabledIf:</strong> parameter is disabled if other parameters have some values.<br/>
													<em>Syntax (like RequiredIf rule):<br/></br:>DisabledIf?(ANY|ALL)[param_1=value1,param_2=value2,...]</em> (all conditions or any condition)</li>
315
316
317
												</ul>
											</td>
										</tr>
318
319
320
321
		
									</tbody>
								</table>
							</div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
322
					
323
					<h3>add_parameter_list()</h3>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
324
					
Jerome Mariette's avatar
Jerome Mariette committed
325
326
327
						<p>The <code>add_parameter_list()</code> method takes the same arguments as <code>add_parameter()</code>. However, adding this parameter,
						the final user will be allowed to enter multiple values for this parameter and the object attribut <code>self.parameter_name</code> will be
						settled as a Python list.</p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
328
					
329
330
331
332
				</div>
				
	       		
	       		<div id="input_parameters" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
333
	       			<h2>Inputs</h2>
334
	       			
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
335
					<p>Just like 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 
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
336
					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 as he 
Jerome Mariette's avatar
Jerome Mariette committed
337
338
					wants.</p>
	       			
Jerome Mariette's avatar
Jerome Mariette committed
339
	       				<h3>add_input_file()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
340
341
342
343
344
345
							<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>
Jerome Mariette's avatar
Jerome Mariette committed
346
347
348
349
				    		<pre class="pre-hl "><code class="python">self.add_input_file_list("reads", 
                         "Which read files should be used", 
                         file_format="fastq", 
                         required=True)</code></pre>
Jerome Mariette's avatar
Jerome Mariette committed
350
351
				    	</div>
				    		
352
353
							<h4>Options</h4>
								
Jerome Mariette's avatar
Jerome Mariette committed
354
								<p>There are two positional argument : <code>name</code> and <code>help</code>. All other options are keyword options. </p>
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
                      
								<div class="table-responsive">
									<table class="table table-bordered table-striped">
										<thead>
											<tr>
												<th>Name</th>
												<th>Type</th>
												<th>Required</th>
												<th>Default value</th>
												<th>Description</th>
											</tr>
										</thead>
										<tbody>
											<tr>
												<td>name</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
370
												<td>string</td>
371
372
												<td>true</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
373
374
												<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>
375
376
377
378
											</tr>
											
											<tr>
												<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
379
												<td>string</td>
380
381
												<td>true</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
382
												<td>The parameter help message.</td>
383
384
385
386
387
388
389
											</tr>
											
											<tr>
												<td>default</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
390
												<td>The default path value.</td>
391
392
393
394
395
396
397
											</tr>
										
											<tr>
												<td>file_format</td>
												<td>string</td>
												<td>false</td>
												<td>"any"</td>
Jerome Mariette's avatar
Jerome Mariette committed
398
399
												<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>
400
401
402
403
404
405
406
											</tr>
											
											<tr>
												<td>type</td>
												<td>string</td>
												<td>false</td>
												<td>"inputfile"</td>
Jerome Mariette's avatar
Jerome Mariette committed
407
408
409
410
411
412
												<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>
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
											</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>
Jerome Mariette's avatar
Jerome Mariette committed
428
												<td>The command line flag (if the value is None, the flag will be <code>--name</code>).</td>
429
430
431
432
433
434
435
											</tr>
											
											<tr>
												<td>group</td>
												<td>string</td>
												<td>false</td>
												<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
436
												<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
437
438
439
440
441
442
443
											</tr>
											
											<tr>
												<td>display_name</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
444
												<td>The parameter name that should be displayed on the final form.</td>
445
446
447
448
449
450
451
											</tr>
											
											<tr>
												<td>add_to</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
452
453
												<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>
454
455
456
457
458
459
460
											</tr>
											
											<tr>
												<td>size_limit</td>
												<td>string</td>
												<td>false</td>
												<td>"0"</td>
Jerome Mariette's avatar
Jerome Mariette committed
461
462
463
												<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>
464
											</tr>
465
466
467
468
469
470
471
472
473
474
475
476
477

											<tr>
												<td>rules</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
												<td>Define custom rules on the parameter. Rules are separated by a ";"<br/>
													Available rules:<br/>
													<ul>
														<li><strong>Exclude:</strong> exclude parameters. If one is given, the other must be not given.<br/>
														<em>Syntax: Exclude=param1,param2,...</em></li>
														<li><strong>ToBeRequired:</strong> require other parameters if parameter is given.<br/>
														<em>Syntax: ToBeRequired=param1,param2,...</em></li>
Floreal Cabanettes's avatar
Floreal Cabanettes committed
478
479
480
481
														<li><strong>RequiredIf:</strong> parameter is required only if other parameters have (or have not) some values.<br/>
														<em>Syntax: RequiredIf?(ANY|ALL)[param_1=value1,param_2!=value2,...] (all conditions or any condition)</em><br/>
														Special values: * for any value of the parameter (not empty), None for not given (or empty)<br/>
														Example: RequiredIf?ANY[adapter_1!="AATGC",adapter_2=*,gtf_file=None]</li>
482
483
														<li><strong>DisabledIf:</strong> parameter is disabled if other parameters have some values.<br/>
														<em>Syntax (like RequiredIf rule):<br/></br:>DisabledIf?(ANY|ALL)[param_1=value1,param_2=value2,...]</em> (all conditions or any condition)</li>
484
485
486
487
														</ul>
												</td>
											</tr>

488
489
490
491
492
										</tbody>
									</table>
								</div>
								
					    <h3>add_input_file_list()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
493
494
495
496
					    
						<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>
Jerome Mariette's avatar
Jerome Mariette committed
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
						
						<h3>add_input_directory()</h3>
						<p>
							The <code>add_input_directory()</code> method allows the user to select files from a specific directory. This 
							kind of input can be useful for tools outputing not only files but an organized directory.
							The parameter <code>get_files_fn</code> specify the function that will be used to retrieve the files. This method can 
							take as many arguments as required, but the first argument has to be a string representing the folder path.
							By default all files will be selected. From the workflow <code>process()</code> function, the files can be retrieved
							by using the <code>get_files()</code> method.
						</p>
						
						<h4>Example</h4>
	       				<p>
	       					In the following example, the <code>add_input_directory()</code> method is used to parse a directory and retrieve only fasta files
	       					inside this directory. <code>get_files()</code> will browse the directory and get all fasta files.
						</p>
			    		<div>
			    		<pre class="pre-hl "><code class="python">import os
from jflow.Workflow import Workflow

def fasta_files(folder):
    res = []
    for file in os.listdir(folder):
        if file.endswith(".fasta"):
            res.append(file)
    return res

class MyWorkflow(Workflow):
    def define_parameters(self, function="process"):
        self.add_input_directory("fastadir", "Path to folder with fasta files", 
            get_files_fn=fasta_files)

    def process(self):
        # to retrieve the files
        for fastafile in self.fastadir.get_files():
            # do something</code></pre>
				    	</div>
				    		
			    		<h4>Options</h4>
						<p>There are two positional argument : <code>name</code> and <code>help</code>. All other options are keyword options. </p>
						<div class="table-responsive">
							<table class="table table-bordered table-striped">
								<thead>
									<tr>
										<th>Name</th>
										<th>Type</th>
										<th>Required</th>
										<th>Default value</th>
										<th>Description</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>name</td>
										<td>string</td>
										<td>true</td>
										<td>None</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>
										<td>help</td>
										<td>string</td>
										<td>true</td>
										<td>None</td>
										<td>The parameter help message.</td>
									</tr>
									
									<tr>
										<td>default</td>
										<td>string</td>
										<td>false</td>
										<td>None</td>
										<td>The default path value.</td>
									</tr>
								
									<tr>
										<td>get_files_fn</td>
										<td>function</td>
										<td>false</td>
										<td>-</td>
										<td>
											get_files_fn will be the method called when executing <code>param.get_files()</code>. All argument from get_files()
											will be used as arguments in get_files_fn
										</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 command line flag (if the value is None, the flag will be <code>--name</code>).</td>
									</tr>
									
									<tr>
										<td>group</td>
										<td>string</td>
										<td>false</td>
										<td>"default"</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>
										<td>display_name</td>
										<td>string</td>
										<td>false</td>
										<td>None</td>
										<td>The parameter name that should be displayed on the final form.</td>
									</tr>
616
617
618
619
620
621
622
623
624
625
626
627
628

								<tr>
									<td>rules</td>
									<td>string</td>
									<td>false</td>
									<td>None</td>
									<td>Define custom rules on the parameter. Rules are separated by a ";"<br/>
										Available rules:<br/>
										<ul>
											<li><strong>Exclude:</strong> exclude parameters. If one is given, the other must be not given.<br/>
											<em>Syntax: Exclude=param1,param2,...</em></li>
											<li><strong>ToBeRequired:</strong> require other parameters if parameter is given.<br/>
											<em>Syntax: ToBeRequired=param1,param2,...</em></li>
Floreal Cabanettes's avatar
Floreal Cabanettes committed
629
630
631
632
											<li><strong>RequiredIf:</strong> parameter is required only if other parameters have (or have not) some values.<br/>
												<em>Syntax: RequiredIf?(ANY|ALL)[param_1=value1,param_2!=value2,...] (all conditions or any condition)</em><br/>
												Special values: * for any value of the parameter (not empty), None for not given (or empty)<br/>
												Example: RequiredIf?ANY[adapter_1!="AATGC",adapter_2=*,gtf_file=None]</li>
633
634
											<li><strong>DisabledIf:</strong> parameter is disabled if other parameters have some values.<br/>
														<em>Syntax (like RequiredIf rule):<br/></br:>DisabledIf?(ANY|ALL)[param_1=value1,param_2=value2,...]</em> (all conditions or any condition)</li>
635
636
637
										</ul>
									</td>
								</tr>
Jerome Mariette's avatar
Jerome Mariette committed
638
639
640
								</tbody>
							</table>
						</div>
641
642
	       		</div>

Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
643
644
645
646
				
				<div id="multiple_parameters" class="subgroup">
					<h2>Multiple parameters</h2>
					
Jerome Mariette's avatar
Jerome Mariette committed
647
648
649
650
651
652
653
654
655
656
657
658
659
						<p>Jflow offers, to the developper, the possibility to structure the input data by using the notion of multiple parameters. A multi 
						parameter is a collection of parameters linked together. Just like for parameters and inputs, it can be added to handle a single collection or a 
						list of collections. Thus, the <code>add_multiple_parameter()</code> method can be used to force the final user to provide one and only one 
						collection, where the <code>add_multiple_parameter_list()</code> method allows the final user to give as many collection he wants. To add a 
						parameter within the multiple parameter, it only requires to set the option <code>add_to</code> of any methods previously described. 
						The accessible object attribut <code>self.multi_parameter_name</code> is then a Python dictionary gathering all the values of the different 
						parameters under the format <code>{"sub_parameter1":value}</code></p>
						
						<h3>add_multiple_parameter()</h3>
						
						<h4>Example</h4>
						The following example creates a multiple parameter named <code>library</code> which contains two input files <code>R1</code> and <code>R2</code> 
						and a <code>sequencer</code> parameter. </p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
660
661
662
663
664
665
				    	
				    	<div>
				    		<pre class="pre-hl "><code class="python">self.add_multiple_parameter("library", "Library.", required=True)
self.add_input_file("R1", "Path to R1 file.", required=True, add_to="library")
self.add_input_file("R2", "Path to R2 file.", add_to="library")
self.add_parameter("sequencer", "The sequencer type.", choices=["HiSeq2000", 
Philippe Bardou's avatar
Philippe Bardou committed
666
    "ILLUMINA", "UNKNOWN"], default="HiSeq2000", add_to="library")</code></pre>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
667
				    	</div>
Jerome Mariette's avatar
Jerome Mariette committed
668
669

						<h4>Options</h4>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
670
						<p>There are two positional arguments : name and help. All other options are keyword options.</p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
671
								
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
672
673
674
675
676
677
678
679
680
681
682
683
684
685
								<div class="table-responsive">
										<table class="table table-bordered table-striped">
											<thead>
												<tr>
													<th>Name</th>
													<th>Type</th>
													<th>Required</th>
													<th>Default value</th>
													<th>Description</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td>name</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
686
													<td>string</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
687
688
													<td>true</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
689
690
691
													<td>The name of the multi parameter. The parameter value is accessible 
														within the workflow object through the attribute named <code>self.multi_parameter_name</code>. And its sub parameters
														using <code>self.multi_parameter_name["sub_parameter_name"]</code>.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
692
693
694
695
												</tr>
												
												<tr>
													<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
696
													<td>string</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
697
698
													<td>true</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
699
													<td>The parameter help message.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
												</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>
Jerome Mariette's avatar
Jerome Mariette committed
715
716
													<td>The command line flag (if the value is None, the flag will be <code>--name</code>). The sub parameters can be set as following
													<code>--name sub1=... sub2=...</code></td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
717
718
719
720
721
722
723
												</tr>
												
												<tr>
													<td>group</td>
													<td>string</td>
													<td>false</td>
													<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
724
													<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
725
726
727
728
729
730
731
												</tr>
												
												<tr>
													<td>display_name</td>
													<td>string</td>
													<td>false</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
732
													<td>The parameter name that should be displayed on the final form.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
733
												</tr>
734
735
736
737
738
739
740
741
742

												<tr>
													<td>rules</td>
													<td>string</td>
													<td>false</td>
													<td>None</td>
													<td>Define custom rules on the parameter. Rules are separated by a ";"<br/>
														Available rules:<br/>
														<ul>
Floreal Cabanettes's avatar
Floreal Cabanettes committed
743
744
															<li><strong>FilesUnique:</strong> all files in all sub-parameters must be unique.<br/>
															<em>Syntax: FilesUnique</em></li>
745
746
747
														</ul>
													</td>
												</tr>
Jerome Mariette's avatar
Jerome Mariette committed
748
												
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
749
750
751
752
753
											</tbody>
										</table>
									</div>
						
						<h3>add_multiple_parameter_list()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
754
755
756
						<p>This method takes the same arguments as <code>add_multiple_parameter()</code>. However, adding this parameter,
						the final user will be allowed to provide multiple collection and the object attribut <code>self.multi_parameter_name</code> will be
						settled as a Python list of Python dictionary.</p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
757
758
759
						
				</div>

Jerome Mariette's avatar
Jerome Mariette committed
760
			</section>
Philippe Bardou's avatar
Philippe Bardou committed
761
762
			
	  		<section id="process" class="group">
Jerome Mariette's avatar
Jerome Mariette committed
763
		    	<h1 class="page-header">Process</h1>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
764
		    	<p>The <code>process()</code> method is in charge of building the workflow by adding components (using the method <code>add_component()</code>) and 
Jerome Mariette's avatar
Jerome Mariette committed
765
		    	linking their inputs and their outputs. A component is a class representing a workflow step. See the 
Jerome Mariette's avatar
Jerome Mariette committed
766
		    	<a href="./jflow-core-component.html">component</a> documentation for more information.</p>
Jerome Mariette's avatar
Jerome Mariette committed
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783

   				<h2>add_component()</h2>
   				<p>The <code>add_component()</code> method add a component to the workflow by building a <code>jflow.component.Component</code>
   				object and returning it. All attributs defined within this object, such as the outputs, are then available from the workflow and 
   				can be used as inputs of other components.</p>
   				<h3>Example</h3>
   				<p>In the following example, the first component <code>BWAIndex</code> is built and returned in the <code>bwaindex</code> object.
   				The output <code>bwaindex.databank</code> is accessible as an object attribut and can be used as input of the <code>BWAmem</code>
   				component. This example is extracted from the <a href="./jflow-quickstart.html">Quick start</a>.</p>
					<div>
				    <pre class="pre-hl "><code class="python"># index the reference genome
bwaindex = self.add_component("BWAIndex", [self.reference_genome])
# align reads against the indexed genome
bwamem = self.add_component("BWAmem", [bwaindex.databank, self.reads])</code></pre>
				    	</div>
   				<h3>Options</h3>
   				<p>There is one positional argument : component_name. All other options are keyword options.</p>
Frédéric Escudié's avatar
Frédéric Escudié committed
784
785
786
787
788
789
790
791
792
793
794
795
796
797
   				<div class="table-responsive">
					<table class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>Name</th>
								<th>Type</th>
								<th>Required</th>
								<th>Default value</th>
								<th>Description</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>component_name</td>
Jerome Mariette's avatar
Jerome Mariette committed
798
								<td>string</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
799
								<td>true</td>
Jerome Mariette's avatar
Jerome Mariette committed
800
801
								<td>None</td>
								<td>The component class name to add to the workflow.</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
							</tr>
							<tr>
								<td>args</td>
								<td>list</td>
								<td>false</td>
								<td>[]</td>
								<td>The component's arguments (see <a href="./jflow-core-component.html#define_parameters">here</a> for more details).</td>
							</tr>
							<tr>
								<td>kwargs</td>
								<td>dict</td>
								<td>false</td>
								<td>{}</td>
								<td>The component's keyword arguments (see <a href="./jflow-core-component.html#define_parameters">here</a> for more details).</td>
							</tr>
							<tr>
								<td>component_prefix</td>
Jerome Mariette's avatar
Jerome Mariette committed
819
								<td>string</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
820
821
								<td>false</td>
								<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
822
823
								<td>The prefix is used to name the component at the execution. The prefix allows to add multiple components of the same class within
								the same workflow.</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
824
825
826
							</tr>
						</tbody>
					</table>
Jerome Mariette's avatar
Jerome Mariette committed
827
828
				</div>
			</section>
Philippe Bardou's avatar
Philippe Bardou committed
829
830
			
	  		<section id="other_methods" class="group">
Jerome Mariette's avatar
Jerome Mariette committed
831
		    	<h1 class="page-header">Other methods</h1>
Frédéric Escudié's avatar
Frédéric Escudié committed
832
				<div id="pre_process" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
833
					<h2>Pre process</h2>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
834
					<p><code>pre_process()</code> is executed before running the <code>process</code> method. Unlike <code>process</code>, this method does not allow
Jerome Mariette's avatar
Jerome Mariette committed
835
836
					to add components, but can be useful when implementing an application requiring to prepare some data before running the workflow (insert / recover
					information from a database, add metadata to the workflow, ...).</p>
Frédéric Escudié's avatar
Frédéric Escudié committed
837
838
				</div>
				<div id="post_process" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
839
840
841
					<h2>Post process</h2>
					<p><code>post_process()</code> is executed right after the <code>process</code> method and cannot be used to add components. This method can
					be useful to perform some database transactions and to synchronize data.</p>
Frédéric Escudié's avatar
Frédéric Escudié committed
842
				</div>
Jerome Mariette's avatar
Jerome Mariette committed
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
				<div id="set_to_address" class="subgroup">
					<h2>Set to address</h2>
					<p><code>set_to_address()</code> overwrite the value <code>to_address</code> defined in the jflow configuration file.</p>
	   				<h3>Options</h3>
	   				<p>There is one required argument : to_address.</p>
	   				<div class="table-responsive">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>Name</th>
									<th>Type</th>
									<th>Required</th>
									<th>Default value</th>
									<th>Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>to_address</td>
									<td>string</td>
									<td>true</td>
									<td>None</td>
									<td>The email address to use to send an email to the user once the workflow is completed.</td>
								</tr>
							</tbody>
						</table>
					</div>
					
				</div>
				<div id="set_subject" class="subgroup">
					<h2>Set email subject</h2>
					<p><code>set_subject()</code> </code> overwrite the value <code>subject</code> defined in the jflow configuration file.</p>
	   				<h3>Options</h3>
	   				<p>There is one required argument : subject.</p>
	   				<div class="table-responsive">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>Name</th>
									<th>Type</th>
									<th>Required</th>
									<th>Default value</th>
									<th>Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>subject</td>
									<td>string</td>
									<td>true</td>
									<td>None</td>
894
									<td>The email subject to use for the email sent to the user once the workflow is completed.<br />
895
896
897
									Placeholders can be used to access workflow attributes or unparametred methods: 
									<code>###attribute###</code> or <code>###method()###</code>. For timestamps you can apply 
									date function with the following syntax: <code>###attribute|date###</code> or <code>###method()|date###"</code>.
898
									</td>
Jerome Mariette's avatar
Jerome Mariette committed
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div id="set_message" class="subgroup">
					<h2>Set email message</h2>
					<p><code>set_message()</code> overwrite the value <code>message</code> defined in the jflow configuration file.</p>
	   				<h3>Options</h3>
	   				<p>There is one required argument : message.</p>
	   				<div class="table-responsive">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>Name</th>
									<th>Type</th>
									<th>Required</th>
									<th>Default value</th>
									<th>Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>message</td>
									<td>string</td>
									<td>true</td>
									<td>None</td>
926
									<td>The email message to use for the email sent to the user once the workflow is completed.<br />
927
928
929
									Placeholders can be used to access workflow attributes or unparametred methods: 
									<code>###attribute###</code> or <code>###method()###</code>. For timestamps you can apply 
									date function with the following syntax: <code>###attribute|date###</code> or <code>###method()|date###"</code>.
930
									</td>
Jerome Mariette's avatar
Jerome Mariette committed
931
932
933
934
935
								</tr>
							</tbody>
						</table>
					</div>
				</div>
Jerome Mariette's avatar
Jerome Mariette committed
936
937
				<div id="get_resource" class="subgroup">
					<h2>Get shared resources</h2>
938
					<p>The method <code>get_resource()</code>, giving a specific resource, returns the defined value within the <code>resources</code> 
Jerome Mariette's avatar
Jerome Mariette committed
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
					section of the jflow configuration file.</p>
	   				<h3>Options</h3>
	   				<p>There is one required argument : resource.</p>
	   				<div class="table-responsive">
						<table class="table table-bordered table-striped">
							<thead>
								<tr>
									<th>Name</th>
									<th>Type</th>
									<th>Required</th>
									<th>Default value</th>
									<th>Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>resource</td>
									<td>string</td>
									<td>true</td>
									<td>None</td>
									<td>The resource name for which is requested the configured value.</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
Jerome Mariette's avatar
Jerome Mariette committed
965
			</section>
966
967
968
969

			<section id="your-rules" class="group">

			</section>
Philippe Bardou's avatar
Philippe Bardou committed
970
		  </div>
971
972
		</div>
		
Jerome Mariette's avatar
Jerome Mariette committed
973
974
975
      <hr>
      <footer>
      	<div class="container" style="text-align: center;">
Philippe Bardou's avatar
Philippe Bardou committed
976
		  <p>Copyright © 2015, INRA | Designed by <a target="_blank" href="http://bioinfo.genotoul.fr/">GenoToul Bioinfo platform</a> and <a target="_blank" href="http://www.sigenae.org/">Sigenae platform</a>.</p>
Jerome Mariette's avatar
Jerome Mariette committed
977
978
979
		</div>
      </footer>
	
980
	</div>
Jerome Mariette's avatar
Jerome Mariette committed
981
982
983
984
985
986
987
988
989
990
	
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- <script src="../../assets/js/docs.min.js"></script> -->
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <!-- <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> -->
	
Philippe Bardou's avatar
Philippe Bardou committed
991
992
993
994
	<!--  Highlight code -->
	<script src="js/highlight.pack.js"></script>
	<script>hljs.initHighlightingOnLoad();</script>
	
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
995
	<script type='text/javascript'>
Philippe Bardou's avatar
Philippe Bardou committed
996
997
998
999
1000
		$('body').scrollspy({
    		target: '.bs-docs-sidebar',
    		offset: 150
		});
	</script>
1001
</body>
1002
</html>