diff nonpareil.xml @ 3:9016f67b716f draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nonpareil commit 062d683f6b646318503d32aaad3ddfa35bb2f20e
author iuc
date Thu, 13 Feb 2025 19:37:59 +0000
parents cef64c36c89e
children
line wrap: on
line diff
--- a/nonpareil.xml	Tue Mar 12 08:50:50 2024 +0000
+++ b/nonpareil.xml	Thu Feb 13 19:37:59 2025 +0000
@@ -1,4 +1,4 @@
-<tool id="nonpareil" name="Nonpareil" version="@TOOL_VERSION@.1" profile="21.01">
+<tool id="nonpareil" name="Nonpareil" version="@TOOL_VERSION@+galaxy0" profile="21.01">
     <description>to estimate average coverage and generate Nonpareil curves</description>
     <macros>
         <import>macros.xml</import>
@@ -8,6 +8,9 @@
     <version_command>nonpareil -V</version_command>
     <command detect_errors="exit_code">
 <![CDATA[
+#import re
+#set summary_path = re.sub('[^\s\w\-.]', '_', str($input.element_identifier))
+
 ln -s '$input' input &&
 
 nonpareil
@@ -30,7 +33,7 @@
     #if $log_test
         -l '$log'
     #end if
-    -o '$summary'
+    -o '$summary_path'
     $use_portion_in_output
     -m '$sampling.min_sampling_portion'
     -M '$sampling.max_sampling_portion'
@@ -45,7 +48,10 @@
         -x '$mating.proba'
     #end if
     -r '$seed'
-    && echo $log_test
+&& cp '$summary_path' '$summary'
+#if '$json_object'
+    && NonpareilCurves.R --json '$json_output' '$summary_path'
+#end if
     ]]></command>
     <inputs>
         <param name="input" type="data" format="fastq,fasta" label="Input sequences" help="FastQ format is recommended for kmer algorithm and Fasta for the alignment" argument="-s"/>
@@ -72,6 +78,7 @@
         </section>
         <param name="seed" type="integer" value="1000" min="0" label="Random generator seed?" argument="-r"/>
         <param name="log_test" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output log file?"/>
+        <param name="json_object" type="boolean" label="Extract the curves object as a JSON file?" help="Can be used as an input for MultiQC"/>
     </inputs>
     <outputs>
         <data format="tabular" name="summary" label="${tool.name} on ${on_string}: Redundancy summary">
@@ -87,10 +94,13 @@
         <data format="txt" name="log" label="${tool.name} on ${on_string}: Log">
             <filter>log_test</filter>
         </data>
+        <data format="txt" name="json_output" label="${tool.name} on ${on_string}: Curves object (JSON)">
+            <filter>json_object</filter>
+        </data>
         <data format="tabular" name="mating_vector_output" label="${tool.name} on ${on_string}: Mates distribution"/>
     </outputs>
     <tests>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="5">
             <param name="input" value="test.fasta"/>
             <param name="algo" value="alignment"/>
             <param name="subsampling" value="0.7"/>
@@ -110,6 +120,7 @@
             </section>
             <param name="seed" value="1000"/>
             <param name="log_test" value="true"/>
+            <param name="json_object" value="true"/>
             <output name="all_data_output" value="test1-all_data_output" compare="sim_size" delta="0"/>
             <output name="log">
                 <assert_contents>
@@ -120,6 +131,14 @@
             </output>
             <output name="summary" value="test1-summary" compare="sim_size" delta="0"/>
             <output name="mating_vector_output" value="test1-mating_vector_output" compare="sim_size" delta="0"/>
+            <output name="json_output">
+                <assert_contents>
+                    <has_text text="LRstar"/>
+                    <has_text text="alignment"/>
+                    <has_text text="test.fasta"/>
+                    <has_text text="500"/>
+                </assert_contents>
+            </output>
         </test>
         <test expect_num_outputs="3">
             <param name="input" value="test.fastq"/>