Maintenance - Mise à jour mensuelle Lundi 6 Avril 2020 entre 7h00 et 9h00

Commit 571620c8 authored by Penom Nom's avatar Penom Nom

No commit message

No commit message
parent 4da860d2
......@@ -702,21 +702,38 @@ class MyWorkflow (NG6Workflow):
<h3>add_input_directory()</h3>
<p>
The add input directory allow the user to select a list of files inside a specific directory. The created parameter has a method <code>get_files()</code>
which must then be used to retrieve the files. By default, the <code>get_files()</code> method will retrieve all files of the given directory.
The add input directory allow the user to select a list of files inside a specific directory.
The parameter <code>get_files_fn</code> specify a function that can be used to retrieve a list of files inside the specified
folder. This method can have as many arguments as it should, but must have as first argument a string which represents the path of the parsed folder.
By default all files will be selected. To retrieve the list of files inside the directory, use the method <code>get_files()</code>
from the created parameter object.
</p>
<h4>Example</h4>
<p>
In the following example, the <code>add_input_directory()</code> method is used to parse a CASAVA directory.
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">self.add_input_directory("casava_directory",
"Path to the CASAVA directory to use", required=True,
get_files_fn=get_files_from_casava, group="Sample description")
<pre class="pre-hl "><code class="python">import os
from ng6.ng6workflow import NG6Workflow
# to retrieve the files
self.casava_directory.get_files( *args)</code></pre>
def fasta_files(folder):
res = []
for file in os.listdir(folder):
if file.endswith(".fasta"):
res.append(file)
return res
class WF(NG6Workflow):
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>
......
......@@ -88,7 +88,7 @@
</ul>
</li>
<li><a target="_blank" href="http://www.cse.nd.edu/~ccl/software/makeflow/">Makeflow</a>: a workflow
engine for executing large complex workflows on clusters, clouds, and grids. The supported version are v4.2.2 or higher.</li>
engine for executing large complex workflows on clusters, clouds, and grids. The supported versions are v4.2.2 or higher.</li>
<li>An existing <a target="_blank" href="http://www.mysql.fr/">mysql</a> database: the database should be accessible from
the application with a user/password with create/truncate privileges.</li>
<li>an <a target="_blank" href="http://httpd.apache.org/download.cgi">apache</a> WEB server and the php-mysql module.</li>
......@@ -159,7 +159,10 @@ tmp_directory = /path/to/tmp
<p>Once the <code>application.properties</code> file is configured, run the following command </p>
<pre class="pre-hl "><code class="ini">[user@hostname:~] python bin/ng6_install.py --web-path /var/www/html/ng6 --email admin@domain</code></pre>
<p>To finalize the installation, go to <a href="http://127.0.0.1/ng6/index.php?id=3">http://127.0.0.1/ng6/index.php?id=3</a>, where you will have to fill the following form:</p>
<p>
To finalize the installation, go to <a href="http://127.0.0.1/ng6/index.php?id=3">http://127.0.0.1/ng6/index.php?id=3</a> (the link may vary
depending on your configuration) where you will have to fill the following form:
</p>
<div class="bs-docs-example" style="text-align: center;">
<img width="80%" src="img/ng6_install.png" class="img-rounded">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment