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

jflow_core_workflow.html 40 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>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
78
			       		<li><a href="#exclusion_rules">Exclusion rules</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
79
80
81
	                </ul>
                </li>
				<li><a href="#process">Process</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
82
83
84
85
				<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
86
87
88
						<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
89
						<li><a href="#get_resource">Get resource</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
90
91
					</ul>
				</li>
Philippe Bardou's avatar
Philippe Bardou committed
92
93
94
	        </ul>
   	    </nav>
   	 
Jerome Mariette's avatar
Jerome Mariette committed
95
        <div class="col-xs-12 col-sm-9">
Jerome Mariette's avatar
Jerome Mariette committed
96
97
98
99
100
101
102
103
        
           	<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
104
        	<section id="workflow-architecture" class="group">
Philippe Bardou's avatar
Philippe Bardou committed
105
		    	<h1 class="page-header">Where to add a new workflow</h1>
106
107
		    	<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
108
		    	<ul>
109
110
111
		    		<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
112
113
		    	</ul>
		    	
Philippe Bardou's avatar
Philippe Bardou committed
114
		    	<pre class="pre-hl "><code class="ini">jflow/
Philippe Bardou's avatar
Philippe Bardou committed
115
116
117
118
├── bin/
├── docs/
├── src/
├── workflows/
Philippe Bardou's avatar
Philippe Bardou committed
119
120
121
122
123
│   ├── 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
124
125
126
127
128
129
130
│   ├── components/
│   ├── extparsers/
│   ├── __init__.py
│   ├── formats.py
│   └── types.py
├── applications.properties
└── README</code></pre>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
131
132
		    </section>   
     
Philippe Bardou's avatar
Philippe Bardou committed
133
        	<section id="workflow" class="group">
134
135
		    	<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
136
		    	
Philippe Bardou's avatar
Philippe Bardou committed
137
		    	<ul>
Jerome Mariette's avatar
Jerome Mariette committed
138
			    	<li>implement a class inheriting from the <code>jflow.workflow.Workflow</code> class,</li>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
139
					<li>overload the <code>get_description()</code> method to provide to the final user a description of the workflow,</li>
140
141
142
					<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
143
				</ul>
144
				<p>The class skeleton is given by</p>
Philippe Bardou's avatar
Philippe Bardou committed
145
			    <div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
146
			    	<pre class="pre-hl "><code class="python">from jflow.workflow import Workflow
Jerome Mariette's avatar
Jerome Mariette committed
147

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

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

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

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

Philippe Bardou's avatar
Philippe Bardou committed
162
			<section id="define_parameters" class="group">
Philippe Bardou's avatar
Philippe Bardou committed
163
		    	<h1 class="page-header">Define parameters</h1>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
164
				<p>
Jerome Mariette's avatar
Jerome Mariette committed
165
					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
166
					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
167
				</p>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
168
				<p>
169
					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
170
171
					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
172
				</p>
Philippe Bardou's avatar
Philippe Bardou committed
173
174
175
176
				<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
177
				
178
179
				<div id="parameters" class="subgroup">
					<h2>Parameters</h2>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
180
					
Jerome Mariette's avatar
Jerome Mariette committed
181
					<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
182
183
					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>
184
185
					
					<h3>add_parameter()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
186
						<h4>Example</h4>
187
						<p>
Jerome Mariette's avatar
Jerome Mariette committed
188
							In the following example, a parameter named <code>sequencer</code> 
189
190
191
							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
192
193
194
195
				    		<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>
196
197
198
				    	</div>
						
						<h4>Options</h4>					
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
199
			    	
Jerome Mariette's avatar
Jerome Mariette committed
200
			    			<p>There are two positional arguments: <code>name</code> and <code>help</code>. All other options are keyword options</p>
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
					    	
							<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
216
											<td>string</td>
217
218
											<td>true</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
219
220
											<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>
221
222
223
224
										</tr>
										
										<tr>
											<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
225
											<td>string</td>
226
227
											<td>true</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
228
											<td>The parameter help message.</td>
229
										</tr>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
230
									
231
232
233
234
235
										<tr>
											<td>default</td>
											<td>-</td>
											<td>false</td>
											<td>None</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
236
											<td>The default parameter value. It's type depends on the parameter type.</td>
237
238
239
240
										</tr>
										
										<tr>
											<td>type</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
241
											<td>string</td>
242
243
											<td>false</td>
											<td>"str"</td>
Jerome Mariette's avatar
Jerome Mariette committed
244
245
246
											<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>
247
248
249
250
251
252
										</tr>
										
										<tr>
											<td>choices</td>
											<td>list</td>
											<td>false</td>
Jerome Mariette's avatar
Jerome Mariette committed
253
254
											<td>[]</td>
											<td>A list of the allowed values.</td>
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
										</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
270
											<td>The command line flag (if the value is None, the flag will be <code>--name</code>).</td>
271
272
273
274
275
276
277
										</tr>
										
										<tr>
											<td>group</td>
											<td>string</td>
											<td>false</td>
											<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
278
											<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
279
280
281
282
283
284
285
										</tr>
										
										<tr>
											<td>display_name</td>
											<td>string</td>
											<td>false</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
286
											<td>The parameter name that should be displayed on the final form.</td>
287
288
289
290
291
292
293
										</tr>
										
										<tr>
											<td>add_to</td>
											<td>string</td>
											<td>false</td>
											<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
294
295
											<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>
296
										</tr>
297
298
299
300
301
302
303
304
305

										<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
306
307
308
309
													<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
310
311
312
313
													<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>
314
315
													<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>
316
317
318
												</ul>
											</td>
										</tr>
319
320
321
322
		
									</tbody>
								</table>
							</div>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
323
					
324
					<h3>add_parameter_list()</h3>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
325
					
Jerome Mariette's avatar
Jerome Mariette committed
326
327
328
						<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
329
					
330
331
332
333
				</div>
				
	       		
	       		<div id="input_parameters" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
334
	       			<h2>Inputs</h2>
335
	       			
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
336
					<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
337
					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
338
339
					wants.</p>
	       			
Jerome Mariette's avatar
Jerome Mariette committed
340
	       				<h3>add_input_file()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
341
342
343
344
345
346
							<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
347
348
349
350
				    		<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
351
352
				    	</div>
				    		
353
354
							<h4>Options</h4>
								
Jerome Mariette's avatar
Jerome Mariette committed
355
								<p>There are two positional argument : <code>name</code> and <code>help</code>. All other options are keyword options. </p>
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
                      
								<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
371
												<td>string</td>
372
373
												<td>true</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
374
375
												<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>
376
377
378
379
											</tr>
											
											<tr>
												<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
380
												<td>string</td>
381
382
												<td>true</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
383
												<td>The parameter help message.</td>
384
385
386
387
388
389
390
											</tr>
											
											<tr>
												<td>default</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
391
												<td>The default path value.</td>
392
393
394
395
396
397
398
											</tr>
										
											<tr>
												<td>file_format</td>
												<td>string</td>
												<td>false</td>
												<td>"any"</td>
Jerome Mariette's avatar
Jerome Mariette committed
399
400
												<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>
401
402
403
404
405
406
407
											</tr>
											
											<tr>
												<td>type</td>
												<td>string</td>
												<td>false</td>
												<td>"inputfile"</td>
Jerome Mariette's avatar
Jerome Mariette committed
408
409
410
411
412
413
												<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>
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
											</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
429
												<td>The command line flag (if the value is None, the flag will be <code>--name</code>).</td>
430
431
432
433
434
435
436
											</tr>
											
											<tr>
												<td>group</td>
												<td>string</td>
												<td>false</td>
												<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
437
												<td>The value is used to group a list of parameters in sections. The group is used in both command line and GUI.</td>
438
439
440
441
442
443
444
											</tr>
											
											<tr>
												<td>display_name</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
445
												<td>The parameter name that should be displayed on the final form.</td>
446
447
448
449
450
451
452
											</tr>
											
											<tr>
												<td>add_to</td>
												<td>string</td>
												<td>false</td>
												<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
453
454
												<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>
455
456
457
458
459
460
461
											</tr>
											
											<tr>
												<td>size_limit</td>
												<td>string</td>
												<td>false</td>
												<td>"0"</td>
Jerome Mariette's avatar
Jerome Mariette committed
462
463
464
												<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>
465
											</tr>
466
467
468
469
470
471
472
473
474
475
476
477
478

											<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
479
480
481
482
														<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>
483
484
														<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>
485
486
487
488
														</ul>
												</td>
											</tr>

489
490
491
492
493
										</tbody>
									</table>
								</div>
								
					    <h3>add_input_file_list()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
494
495
496
497
					    
						<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
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
616
						
						<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>
617
618
619
620
621
622
623
624
625
626
627
628
629

								<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
630
631
632
633
											<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>
634
635
											<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>
636
637
638
										</ul>
									</td>
								</tr>
Jerome Mariette's avatar
Jerome Mariette committed
639
640
641
								</tbody>
							</table>
						</div>
642
643
	       		</div>

Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
644
645
646
647
				
				<div id="multiple_parameters" class="subgroup">
					<h2>Multiple parameters</h2>
					
Jerome Mariette's avatar
Jerome Mariette committed
648
649
650
651
652
653
654
655
656
657
658
659
660
						<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
661
662
663
664
665
666
				    	
				    	<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
667
    "ILLUMINA", "UNKNOWN"], default="HiSeq2000", add_to="library")</code></pre>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
668
				    	</div>
Jerome Mariette's avatar
Jerome Mariette committed
669
670

						<h4>Options</h4>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
671
						<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
672
								
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
673
674
675
676
677
678
679
680
681
682
683
684
685
686
								<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
687
													<td>string</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
688
689
													<td>true</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
690
691
692
													<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
693
694
695
696
												</tr>
												
												<tr>
													<td>help</td>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
697
													<td>string</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
698
699
													<td>true</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
700
													<td>The parameter help message.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
												</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
716
717
													<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
718
719
720
721
722
723
724
												</tr>
												
												<tr>
													<td>group</td>
													<td>string</td>
													<td>false</td>
													<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
725
													<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
726
727
728
729
730
731
732
												</tr>
												
												<tr>
													<td>display_name</td>
													<td>string</td>
													<td>false</td>
													<td>None</td>
Jerome Mariette's avatar
Jerome Mariette committed
733
													<td>The parameter name that should be displayed on the final form.</td>
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
734
												</tr>
735
736
737
738
739
740
741
742
743

												<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
744
745
															<li><strong>FilesUnique:</strong> all files in all sub-parameters must be unique.<br/>
															<em>Syntax: FilesUnique</em></li>
746
747
748
														</ul>
													</td>
												</tr>
Jerome Mariette's avatar
Jerome Mariette committed
749
												
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
750
751
752
753
754
											</tbody>
										</table>
									</div>
						
						<h3>add_multiple_parameter_list()</h3>
Jerome Mariette's avatar
Jerome Mariette committed
755
756
757
						<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
758
759
760
						
				</div>

Jerome Mariette's avatar
Jerome Mariette committed
761
			</section>
Philippe Bardou's avatar
Philippe Bardou committed
762
763
			
	  		<section id="process" class="group">
Jerome Mariette's avatar
Jerome Mariette committed
764
		    	<h1 class="page-header">Process</h1>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
765
		    	<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
766
		    	linking their inputs and their outputs. A component is a class representing a workflow step. See the 
Jerome Mariette's avatar
Jerome Mariette committed
767
		    	<a href="./jflow-core-component.html">component</a> documentation for more information.</p>
Jerome Mariette's avatar
Jerome Mariette committed
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784

   				<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
785
786
787
788
789
790
791
792
793
794
795
796
797
798
   				<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
799
								<td>string</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
800
								<td>true</td>
Jerome Mariette's avatar
Jerome Mariette committed
801
802
								<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
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
							</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
820
								<td>string</td>
Frédéric Escudié's avatar
Frédéric Escudié committed
821
822
								<td>false</td>
								<td>"default"</td>
Jerome Mariette's avatar
Jerome Mariette committed
823
824
								<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
825
826
827
							</tr>
						</tbody>
					</table>
Jerome Mariette's avatar
Jerome Mariette committed
828
829
				</div>
			</section>
Philippe Bardou's avatar
Philippe Bardou committed
830
831
			
	  		<section id="other_methods" class="group">
Jerome Mariette's avatar
Jerome Mariette committed
832
		    	<h1 class="page-header">Other methods</h1>
Frédéric Escudié's avatar
Frédéric Escudié committed
833
				<div id="pre_process" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
834
					<h2>Pre process</h2>
Ibouniyamine Nabihoudine's avatar
Ibouniyamine Nabihoudine committed
835
					<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
836
837
					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
838
839
				</div>
				<div id="post_process" class="subgroup">
Jerome Mariette's avatar
Jerome Mariette committed
840
841
842
					<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
843
				</div>
Jerome Mariette's avatar
Jerome Mariette committed
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
894
				<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>
895
									<td>The email subject to use for the email sent to the user once the workflow is completed.<br />
896
897
898
									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>.
899
									</td>
Jerome Mariette's avatar
Jerome Mariette committed
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
926
								</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>
927
									<td>The email message to use for the email sent to the user once the workflow is completed.<br />
928
929
930
									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>.
931
									</td>
Jerome Mariette's avatar
Jerome Mariette committed
932
933
934
935
936
								</tr>
							</tbody>
						</table>
					</div>
				</div>
Jerome Mariette's avatar
Jerome Mariette committed
937
938
				<div id="get_resource" class="subgroup">
					<h2>Get shared resources</h2>
939
					<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
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
965
					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
966
			</section>
967
968
969
970

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

			</section>
Philippe Bardou's avatar
Philippe Bardou committed
971
		  </div>
972
973
		</div>
		
Jerome Mariette's avatar
Jerome Mariette committed
974
975
976
      <hr>
      <footer>
      	<div class="container" style="text-align: center;">
Philippe Bardou's avatar
Philippe Bardou committed
977
		  <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
978
979
980
		</div>
      </footer>
	
981
	</div>
Jerome Mariette's avatar
Jerome Mariette committed
982
983
984
985
986
987
988
989
990
991
	
    <!-- 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
992
993
994
995
	<!--  Highlight code -->
	<script src="js/highlight.pack.js"></script>
	<script>hljs.initHighlightingOnLoad();</script>
	
Ibouniyamine Nabihoudine's avatar
wf doc    
Ibouniyamine Nabihoudine committed
996
	<script type='text/javascript'>
Philippe Bardou's avatar
Philippe Bardou committed
997
998
999
1000
1001
		$('body').scrollspy({
    		target: '.bs-docs-sidebar',
    		offset: 150
		});
	</script>
1002
1003
</body>
</html>