Commit 2a3f4128 authored by Maria Bernard's avatar Maria Bernard

adding documentation informations in core-analysis.html

parent 0a56981e
......@@ -206,7 +206,7 @@ class MyComponent (Analysis):
<p>
The <code>define_parameters()</code> method is used to add component parameters, inputs and outputs. To do so, several methods are available.
Once defined, the new parameters are available as object attibuts, thus they are accessible through <code>self.parameter_name</code>.
Once defined, the new parameters are available as object attributs, thus they are accessible through <code>self.parameter_name</code>.
</p>
<p>
......@@ -1045,7 +1045,7 @@ class MyComponent (Analysis):
<h3>PythonFunction</h3>
<p>The <code>PythonFunction</code> can be called when the workflow requires to run an internal Python code defined in a Python functino. This function
<p>The <code>PythonFunction</code> can be called when the workflow requires to run an internal Python code defined in a Python function. This function
allows to define the way the function should be called so ng6 can call and run it automaticly on the final user inputs.</p>
<h4>Example</h4>
......@@ -1260,13 +1260,22 @@ fastaTrim.pl --length 50 splC.fasta > splC_trim.fasta</code></pre>
<h4>Example</h4>
<pre class="pre-hl "><code class="python">fastq_list = ["splA.fastq", "splB.fastq", "splC.fastq"]
out_list = [ ["splA.fasta", "splA.qual"],
["splB.fasta", "splB.qual"],
["splC.fasta", "splC.qual"] ]
out_list = [ ["splA.fasta", "splB.fasta","splC.fasta"],
[ "splA.qual", "splB.qual","splC.qual" ] ]
fastq2fasta = ShellFunction( "fastq2fasta.py --input $1 --fasta $2 --qual $3",
cmd_format="{EXE} {IN} {OUT}" )
MultiMap( fastq2fasta, inputs=fastq_list, outputs=out_list )</code></pre>
or
<pre class="pre-hl "><code class="python">fastq_list = ["splA.fastq", "splB.fastq", "splC.fastq"]
out_fasta_list = ["splA.fasta", "splB.fasta","splC.fasta"]
out_qual_list = [ "splA.qual", "splB.qual","splC.qual" ]
fastq2fasta = ShellFunction( "fastq2fasta.py --input $1 --fasta $2 --qual $3",
cmd_format="{EXE} {IN} {OUT}" )
MultiMap( fastq2fasta, inputs=fastq_list, outputs=[out_fasta_list,out_qual_list] )</code></pre>
<p>This abstraction will lead to the execution of the following command lines:</p>
<pre class="pre-hl "><code class="ini">fastq2fasta.py --input splA.fastq --fasta splA.fasta --qual splA.qual
fastq2fasta.py --input splB.fastq --fasta splB.fasta --qual splB.qual
......@@ -1338,7 +1347,7 @@ fastq2fasta.py --input splC.fastq --fasta splC.fasta --qual splC.qual</code></pr
<section id="post_process" class="group">
<h1 class="page-header">Analysis.post_process()</h1>
<p>
The <code>post_process()</code> method is executed when the <code>process()</code> is done.
The <code>post_process()</code> method is executed when the <code>process()</code> is done, i.e when output files are generated.
It is possible to add information to the database using <code>_add_result_element()</code> inside <code>post_process()</code>.
If the analysis generated some interest files than have to be used in the interface, the method <code>_save_file()</code> can be
used to save a specific file on the storage directory.
......@@ -1430,9 +1439,9 @@ def post_process(self):
<h1 class="page-header">The analysis display</h1>
<p>
The analysis results, added with the <code>_add_result_element()</code> method, can be displayed using a template.
The template is an HTML file written using the PHP Smarty paradigm. To add interaction with the user, a javascript file
can also be written and associated to the template.
The analysis results, added with the <code>_add_result_element()</code> method in the <code>post_process()</code> function, can be displayed using a template HTMl file.
The template is an HTML file written using the PHP Smarty paradigm and must be stored in <code>ui/nG6/pi1/analyses/</code> folder with the same name as your Analysis python file.
To add interaction with the user, a javascript file can also be written and associated to the template (same folder, same name).
</p>
<div id="template_file" class="subgroup">
......
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