Commit 8d3232d0 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 0e0d9574
......@@ -25,19 +25,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/foreach}
<ul>
{foreach from=$params item=param}
{assign var="args_cmd" value=","|explode:$param}
<li class="parameter">{$param}</li>
{assign var="args_cmd" value=","|explode:$param}
{foreach from=$args_cmd item=arg_cmd}
{assign var="params_cmd" value="="|explode:$arg_cmd}
{if in_array("bdiffs", $params_cmd)}
{assign var="bdiffs_index" value=$params_cmd|@array_keys:"bdiffs"}
<ul>
<li class="parameter">The maximum number of differences allowed with the barcode is {$params_cmd[$bdiffs_index[0]+1]|replace:')':''}.</li>
</ul>
{assign var="bdiffs" value=$params_cmd[$bdiffs_index[0]+1]|replace:')':''}
{/if}
{/foreach}
{/foreach}
<br />
<li class="parameter">The maximum number of differences allowed with the barcode is {$bdiffs}.
With <strong> barcodes.oligos </strong> containing:
<br />
<div class="file-display">{$analyse_results["barcodes.oligos"]["default"]["barcodes_file"]}</div>
</li>
</ul>
{/block}
{block name=results_title} Cleaning results {/block}
......@@ -45,27 +49,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<input type="hidden" id="data_folder" value="{$data_folder}"/>
<input type="hidden" id="analysis_folder" value="{$data_folder|cat:$analyse.directory}"/>
<ul>
<li class="parameter">There are {$analyse_results["global"]["default"].ids_failed_trim_seqs_b} sequences deleted because of a problem with the barcode.</li>
<li class="parameter">There are {$analyse_results["global"]["default"].ids_failed_trim_seqs_lb} sequences deleted because of a wrong length and a problem with the barcode.</li>
<li class="parameter">There are {$analyse_results["global"]["default"].ids_failed_trim_seqs_l} sequences deleted because of a wrong length.</li>
</ul>
<br />
<table class="table table-striped table-bordered dataTable analysis-result-table">
<thead>
{assign var="analyse_results_sorted" value=$analyse_results|@ksort}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample == "b"}
<p>There are {$sample_results["default"].ids_failed_trim_seqs} sequences deleted because of a problem with the barcode.</p>
{/if}
{if $sample == "lb"}
<p>There are {$sample_results["default"].ids_failed_trim_seqs} sequences deleted because of a wrong length and a problem with the barcode.</p>
{/if}
{if $sample == "l"}
<p>There are {$sample_results["default"].ids_failed_trim_seqs} sequences deleted because of a wrong length.</p>
{/if}
{/foreach}
<tr>
{if $analyse_results|@count > 1}
{$analyse_results=$analyse_results|array_diff_key:(['b']|array_flip)}
{$analyse_results=$analyse_results|array_diff_key:(['lb']|array_flip)}
{$analyse_results=$analyse_results|array_diff_key:(['l']|array_flip)}
<th>Samples ({$analyse_results|@count})</th>
{assign var="nb_sample" value=$analyse_results|@count}
<th>Samples ({$nb_sample-2})</th>
{/if}
<th>Number of sequences</th>
</tr>
......@@ -74,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="nb_reads_begining" value=0}
{assign var="i" value=0}
{foreach from=$analyse_results_sorted key=sample item=sample_results}
{if $sample != "b" and $sample !="lb" and $sample !="l"}
{if $sample != "global" and $sample != "barcodes.oligos"}
<tr>
{if $analyse_results|@count > 1 }
<td id="sample_id_{$i}">{$sample|get_description:$descriptions}</td>
......
......@@ -17,7 +17,7 @@
from ng6.ng6workflow import NG6Workflow
class RNAdiversity (NG6Workflow):
class R454diversity (NG6Workflow):
def process(self):
......
......@@ -77,8 +77,8 @@ class MothurShhhFlows(Analysis):
def define_analysis(self):
self.name = "roche 454 cleaning sff"
self.description = "Cleaning barcodes."
self.name = "Denoising"
self.description = "Denoise and demultiplex a sff file."
self.software = "mothur"
self.options = "#sffinfo(sff=FILE.sff);"
self.options += "#trim.flow(flow=FILE.flow,oligos=barcodes.oligos,bdiffs="+str(self.bdiffs)+");"
......@@ -117,16 +117,15 @@ class MothurShhhFlows(Analysis):
else:
groups_seqs_count[group] += 1
#number of sequences per sample
# number of sequences per sample
for sample,count in groups_seqs_count.items():
self._add_result_element(sample.replace('.','_'), "nb_seq", count)
#global sequences failed and not by sample
# global sequences failed and not by sample
ids_failed = self._get_id_seq_failed(self.scrap_flow_files[0])
for ids,count in ids_failed.items():
self._add_result_element(ids, "ids_failed_trim_seqs", count)
#TODO add to the db
# #save barcodes
# self._add_result_element(os.path.basename(self.barcodes_file), "barcodes_file", self._save_file(self.barcodes_file, os.path.basename(self.barcodes_file)+".cfg"))
self._add_result_element("global", "ids_failed_trim_seqs_"+ids, count)
# save barcodes
self._add_result_element(os.path.basename(self.barcodes_file), "barcodes_file", self._save_file(self.barcodes_file, os.path.basename(self.barcodes_file)))
def process(self):
# create an barcode file to give as input to mothur
......
......@@ -39,7 +39,7 @@ input_files.required = True
compression.name = compression
compression.flag = --compression
compression.help = How should data be compressed once archived (none|gz|bz2)
compression.default = none
compression.default = gz
compression.choices = none|gz|bz2
reference_alignment.name = reference_alignment
......@@ -73,4 +73,4 @@ classify_taxonomy.required = True
labels.name = labels
labels.flag = --labels
labels.type = str
labels.help = unique-0.03-0.05-0.10
\ No newline at end of file
labels.help = unique-0.03-0.05-0.10
Supports Markdown
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