Commit cd0b8e3d authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fixe a bug in adaptor cleaner

parent 91945346
......@@ -117,13 +117,13 @@ class AdaptorcleanerAnalyse (Analyse):
for adapt in logs["adaptors"].keys():
self._add_result_element(sample, adapt, logs['adaptors'][adapt], "adaptor")
# Figure out what is the mid config file path from the parameters
params = self.options.split()
af = params[params.index("--adaptor")+1]
if os.path.isfile(af):
self._add_result_element(sample, "adaptor_file", self._save_file(af))
params[params.index("--adaptor")+1] = os.path.basename(af)
self.options = " ".join(params)
# Figure out what is the mid config file path from the parameters
params = self.options.split()
af = params[params.index("--adaptor")+1]
if os.path.isfile(af):
self._add_result_element("all", "adaptor_file", self._save_file(af))
params[params.index("--adaptor")+1] = os.path.basename(af)
self.options = " ".join(params)
self._create_and_archive(result_files, archive_name)
......
......@@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{block name=params_title} {$llang.AdaptorcleanerAnalyse_params_title} {/block}
{block name=params_content}
{assign var="params" value=" "|explode:$analyse.params}
{foreach from=$analyse_results key=sample item=sample_results}
{assign var="sample" value=$sample}
{/foreach}
<ul>
{assign var="score_index" value=$params|@array_keys:"--score"}
<li>{$llang.AdaptorcleanerAnalyse_minscore|replace:"###MIN_SCORE###":$params[$score_index[0]+1]}</li>
......@@ -30,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li>{$llang.AdaptorcleanerAnalyse_minmatch|replace:"###MIN_MATCH###":$params[$match_index[0]+1]}</li>
{assign var="len_index" value=$params|@array_keys:"--minlen"}
<li>{$llang.AdaptorcleanerAnalyse_minlen|replace:"###MIN_LEN###":$params[$len_index[0]+1]}</li>
{if $analyse_results[$sample]["default"]["adaptor_file"] == ""}
{if $analyse_results["all"]["default"]["adaptor_file"] == ""}
<li>{$llang.AdaptorcleanerAnalyse_adaptor} <br />
{$isseq=false}
{foreach $params as $param}
......@@ -48,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="index" value=$params|@array_keys:"--adaptor"}
<li>{$llang.AdaptorcleanerAnalyse_adaptor}
<br />
<div class="file-display">{$analyse_results[$sample]["default"]["adaptor_file"]}</div>
<div class="file-display">{$analyse_results["all"]["default"]["adaptor_file"]}</div>
</li>
{/if}
</ul>
......
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