changeset 3:b4c6f054210a draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pear commit 6e869b3e13ed7b012b270f14fce812613642e5f2"
author iuc
date Mon, 04 Apr 2022 08:31:45 +0000
parents 2f804526f5fd
children 037f0acc7830
files pear.xml
diffstat 1 files changed, 84 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/pear.xml	Thu Nov 09 07:28:37 2017 -0500
+++ b/pear.xml	Mon Apr 04 08:31:45 2022 +0000
@@ -1,7 +1,30 @@
-<tool id="iuc_pear" name="Pear" version="0.9.6.1">
+<tool id="iuc_pear" name="Pear" version="@TOOL_VERSION@.@VERSION_SUFFIX@" profile="20.09">
     <description>Paired-End read merger</description>
+    <macros>
+        <token name="@TOOL_VERSION@">0.9.6</token>
+        <token name="@VERSION_SUFFIX@">2</token>
+        <xml name="format_action">
+            <actions>
+                <conditional name="library.type">
+                    <when value="paired">
+                        <action type="format">
+                            <option type="from_param" name="library.forward" param_attribute="ext" />
+                        </action>
+                    </when>
+                    <when value="paired_collection">
+                        <action type="format">
+                            <option type="from_param" name="library.input_collection" param_attribute="forward.ext" />
+                        </action>
+                    </when>
+                </conditional>
+            </actions>
+        </xml>
+    </macros>
+    <xrefs>
+        <xref type="bio.tools">pear</xref>
+    </xrefs>
     <requirements>
-        <requirement type="package" version="0.9.6">pear</requirement>
+        <requirement type="package" version="@TOOL_VERSION@">pear</requirement>
     </requirements>
     <stdio>
         <exit_code range="1:" />
@@ -69,32 +92,32 @@
         </conditional>
 
         <!-- optional -->
-        <param name="pvalue" type="float" value="0.01" min="0" optional="True" max="1" label="Specify a p-value for the statistical test"
+        <param name="pvalue" type="float" value="0.01" min="0" optional="true" max="1" label="Specify a p-value for the statistical test"
             help="If the computed p-value of a possible assembly exceeds the specified p-value then the paired-end read will not be assembled. Setting 1.0 disables the test. (--p-value)" />
 
-        <param name="min_overlap" type="integer" value="10" optional="True" label="Minimum overlap size"
+        <param name="min_overlap" type="integer" value="10" optional="true" label="Minimum overlap size"
             help="The minimum overlap may be set to 1 when the statistical test is used. However, further restricting the minimum overlap size to a proper value may reduce false-positive assembles. (--min-overlap)" />
 
-        <param name="max_assembly_length" type="integer" value="0" optional="True" label="Maximum possible length of the assembled sequences"
+        <param name="max_assembly_length" type="integer" value="0" optional="true" label="Maximum possible length of the assembled sequences"
             help="Setting this value to 0 disables the restriction and assembled sequences may be arbitrary long. (--max-assembly-length)" />
 
-        <param name="min_assembly_length" type="integer" value="50" optional="True" label="Minimum possible length of the assembled sequences"
+        <param name="min_assembly_length" type="integer" value="50" optional="true" label="Minimum possible length of the assembled sequences"
             help="Setting this value to 0 disables the restriction and assembled sequences may be arbitrary short. (--min-assembly-length)" />
 
-        <param name="min_trim_length" type="integer" value="1" optional="True" label="Minimum length of reads after trimming the low quality part"
+        <param name="min_trim_length" type="integer" value="1" optional="true" label="Minimum length of reads after trimming the low quality part"
             help="See option -q. (--min-trim-length)" />
 
-        <param name="quality_threshold" type="integer" value="0" optional="True" label="Quality score threshold for trimming the low quality part of a read"
+        <param name="quality_threshold" type="integer" value="0" optional="true" label="Quality score threshold for trimming the low quality part of a read"
                 help="If the quality scores of two consecutive bases are strictly less than the specified threshold, the rest of the read will be trimmed. (--quality-threshold)" />
 
-        <param name="max_uncalled_base" type="float" value="1.0" min="0" optional="True" max="1" label="Maximal proportion of uncalled bases in a read"
+        <param name="max_uncalled_base" type="float" value="1.0" min="0" optional="true" max="1" label="Maximal proportion of uncalled bases in a read"
             help="Setting this value to 0 will cause PEAR to discard all reads containing uncalled bases. The other extreme setting is 1 which causes PEAR to process all reads independent on the number of uncalled bases. (--max-uncalled-base)" />
 
-        <param name="cap" type="integer" value="40" optional="True" label="Specify  the upper bound for the resulting quality score"
+        <param name="cap" type="integer" value="40" optional="true" label="Specify  the upper bound for the resulting quality score"
             help="If set to zero, capping is disabled. (--cap)" />
 
         <param name="test_method" type="select" label="Type of statistical test" help="(--test-method)">
-            <option value="1" selected="True">Given the minimum allowed overlap, test using the highest OES (1)</option>
+            <option value="1" selected="true">Given the minimum allowed overlap, test using the highest OES (1)</option>
             <option value="2">Use the acceptance probability (2)</option>
         </param>
 
@@ -105,42 +128,76 @@
 
         <param name="score_method" type="select" label="Scoring method" help="(--score-method)">
             <option value="1">OES with +1 for match and -1 for mismatch</option>
-            <option value="2" selected="True">Assembly score (AS) use +1 for match and -1 for mismatch multiplied by base quality scores</option>
+            <option value="2" selected="true">Assembly score (AS) use +1 for match and -1 for mismatch multiplied by base quality scores</option>
             <option value="3">Ignore quality scores and use +1 for a match and -1 for a mismatch</option>
         </param>
 
-        <param name="outputs" type="select" display="checkboxes" optional="False" multiple="True" label="Output files">
-            <option value="assembled" selected="True">Assembled reads</option>
-            <option value="forward">Forward unassembled reads</option>
-            <option value="reverse">Reverse unassembled reads</option>
+        <param name="outputs" type="select" optional="false" multiple="true" label="Output files">
+            <option value="assembled" selected="true">Assembled reads</option>
+            <option value="unassembled_forward">Forward unassembled reads</option>
+            <option value="unassembled_reverse">Reverse unassembled reads</option>
             <option value="discarded">Discarded reads</option>
         </param>
     </inputs>
     <outputs>
-        <data format="input" name="assembled_reads" from_work_dir="pear.assembled.fastq" label="${tool.name} on ${on_string}: Assembled reads">
+        <data name="assembled_reads" from_work_dir="pear.assembled.fastq" label="${tool.name} on ${on_string}: Assembled reads">
+            <expand macro="format_action"/>
             <filter>'assembled' in outputs</filter>
         </data>
-        <data format="input" name="unassembled_forward_reads" from_work_dir="pear.unassembled.forward.fastq" label="${tool.name} on ${on_string}: Unassembled forward reads">
-            <filter>'forward' in outputs</filter>
+        <data format="auto" name="unassembled_forward_reads" from_work_dir="pear.unassembled.forward.fastq" label="${tool.name} on ${on_string}: Unassembled forward reads">
+            <expand macro="format_action"/>
+            <filter>'unassembled_forward' in outputs</filter>
         </data>
-        <data format="input" name="unassembled_reverse_reads" from_work_dir="pear.unassembled.reverse.fastq" label="${tool.name} on ${on_string}: Unassembled reverse reads">
-            <filter>'reverse' in outputs</filter>
+        <data format="auto" name="unassembled_reverse_reads" from_work_dir="pear.unassembled.reverse.fastq" label="${tool.name} on ${on_string}: Unassembled reverse reads">
+            <expand macro="format_action"/>
+            <filter>'unassembled_reverse' in outputs</filter>
         </data>
-        <data format="input" name="discarded_reads" from_work_dir="pear.discarded.fastq" label="${tool.name} on ${on_string}: Discarded reads">
+        <data format="auto" name="discarded_reads" from_work_dir="pear.discarded.fastq" label="${tool.name} on ${on_string}: Discarded reads">
+            <expand macro="format_action"/>
             <filter>'discarded' in outputs</filter>
         </data>
     </outputs>
     <tests>
-        <test>
-            <param name="forward" value="forward.fastq" ftype="fastqsanger" />
-            <param name="reverse" value="reverse.fastq" ftype="fastqsanger" />
+        <test expect_num_outputs="2">
+            <conditional name="library">
+                <param name="type" value="paired"/>
+                <param name="forward" value="forward.fastq" ftype="fastqsanger" />
+                <param name="reverse" value="reverse.fastq" ftype="fastqsanger" />
+            </conditional>
             <param name="min_overlap" value="10" />
             <param name="min_assembly_length" value="50" />
             <param name="cap" value="0" />
-            <param name="outputs" value="assembled,forward" />
+            <param name="outputs" value="assembled,unassembled_forward" />
             <output name="assembled_reads" file="pear_assembled_results1.fastq" ftype="fastqsanger"/>
             <output name="unassembled_forward_reads" file="pear_unassembled_forward_results1.fastq" ftype="fastqsanger"/>
         </test>
+        <!-- same test as before using collection input and fastqillumina 
+             (even if it isn't) .. therefore only loose check of outputs -->
+        <test expect_num_outputs="2">
+            <conditional name="library">
+                <param name="type" value="paired_collection"/>
+                <param name="input_collection">
+                    <collection type="paired">
+                        <element name="forward" value="forward.fastq" ftype="fastqillumina" />
+                        <element name="reverse" value="reverse.fastq" ftype="fastqillumina" />
+                    </collection>
+                </param>
+            </conditional>
+            <param name="min_overlap" value="10" />
+            <param name="min_assembly_length" value="50" />
+            <param name="cap" value="0" />
+            <param name="outputs" value="assembled,unassembled_forward" />
+            <output name="assembled_reads" ftype="fastqillumina">
+                <assert_contents>
+                    <has_line_matching expression="@.*"/>
+                </assert_contents>
+            </output>
+            <output name="unassembled_forward_reads" ftype="fastqillumina">
+                <assert_contents>
+                    <has_line_matching expression="@.*"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help>
 <![CDATA[
@@ -157,6 +214,7 @@
 
 .. _PEAR: https://sco.h-its.org/exelixis/web/software/pear/
 .. _documentation: https://sco.h-its.org/exelixis/web/software/pear/doc.html
+.. _github repository: https://github.com/tseemann/PEAR
 
 Please note that PEAR is released under the
 [CC Attribution-NonCommercial-ShareAlike](https://creativecommons.org/licenses/by-nc-sa/3.0/) license