diff obigrep.xml @ 5:16dc1dbb4cb2 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/obitools commit a01e3c562cf5d62af522b893a25abde6476a1f45
author iuc
date Thu, 30 Oct 2025 16:01:34 +0000
parents 63b47deab5ff
children
line wrap: on
line diff
--- a/obigrep.xml	Wed Sep 01 07:54:50 2021 +0000
+++ b/obigrep.xml	Thu Oct 30 16:01:34 2025 +0000
@@ -1,9 +1,9 @@
 <tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@" profile="@PROFILE@">
     <description>Filters sequence file</description>
-    <expand macro="bio_tools"/>
     <macros>
         <import>macros.xml</import>
     </macros>
+    <expand macro="bio_tools"/>
     <expand macro="requirements"/>
     <expand macro="stdio"/>
     <command><![CDATA[
@@ -39,9 +39,9 @@
         @GENERATE_GALAXY_JSON@
     ]]></command>
     <inputs>
-        <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file" />
+        <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file"/>
         <conditional name="options_grep">
-            <param name="options_grep_selector" type="select" label="Choose the sequence record selection option" >
+            <param name="options_grep_selector" type="select" label="Choose the sequence record selection option">
                 <option value="sequence" selected="true">sequence</option>
                 <option value="definition">definition</option>
                 <option value="identifier">identifier</option>
@@ -53,47 +53,46 @@
                 <option value="lmin">lmin</option>
             </param>
             <when value="sequence">
-                <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive." >
-                    <expand macro="sanitizer" />
+                <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive.">
+                    <expand macro="sanitizer"/>
                 </param>
             </when>
             <when value="definition">
-                <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive." >
-                    <expand macro="sanitizer" />
+                <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive.">
+                    <expand macro="sanitizer"/>
                 </param>
             </when>
             <when value="identifier">
                 <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." >
-                    <expand macro="sanitizer" />
+                    <expand macro="sanitizer"/>
                 </param>
             </when>
             <when value="idlist">
-                <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line." />
+                <param name="idlist" type="data" format="txt,tabular" label="points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line."/>
             </when>
             <when value="attribute">
-                <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive." >
-                    <expand macro="sanitizer" />
+                <param name="attribute" type="text" label="Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive.">
+                    <expand macro="sanitizer"/>
                 </param>
             </when>
             <when value="hasattribute">
-                <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key." >
+                <param name="hasattribute" type="text" label="Selects sequence records having an attribute who is key.">
                     <expand macro="sanitizer" />
                 </param>
             </when>
             <when value="predicat">
-                <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself." >
-                    <expand macro="sanitizer" />
+                <param name="predicat" type="text" label="Python boolean expression to be evaluated for each sequence record." help="The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named sequenceefers to the sequence record itself.">
+                    <expand macro="sanitizer"/>
                 </param>
             </when>
             <when value="lmax">
-                <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax" />
+                <param name="lmax" type="text" label="lmax" help="Keeps sequence records whose sequence length is equal or shorter than lmax"/>
             </when>
             <when value="lmin">
                 <param name="lmin" type="text" label="lmin" help="Keeps sequence records whose sequence length is equal or longer than lmin"/>
             </when>
         </conditional>
-
-        <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)" />
+        <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="Invert the sequence record selection (option -v)"/>
         <expand macro="input_format_options_macro"/>
         <expand macro="out_format_macro"/>
     </inputs>
@@ -101,25 +100,36 @@
         <data format="auto" name="output"/>
     </outputs>
     <tests>
-       <test>
-           <param name="input" value="illuminapairedend.output.fastq" />
-           <conditional name="options_grep">
-               <param name="options_grep_selector" value="lmin"/>
-               <param name="lmin" value="80"/>
-           </conditional>
-           <param name="v" value="true" />
-           <param name="out_format" value="fastq" />
-           <output name="output" file="output_obigrep_lmin.fastq" ftype="fastqsanger"/>
-       </test>
-       <test>
-           <param name="input" value="illuminapairedend.output.fastq.gz" ftype="fastq.gz" />
-           <conditional name="options_grep">
-               <param name="options_grep_selector" value="predicat"/>
-               <param name="predicat" value='mode!="joined"'/>
-           </conditional>
-           <param name="v" value="false" />
-           <param name="out_format" value="fasta" />
-           <output name="output" file="output_obigrep_predicat.fasta.gz" ftype="fasta.gz" decompress="true"/>
+        <test expect_num_outputs="1">
+            <!-- since the test data has large qualities it is sniffed as generic fastq which
+                 is not accepted py the parameter so the ftype is set, in this test we
+                 overwrite tis with the options_inputtype parameter and check if its set
+                 correctly on the CLI-->
+            <param name="input" value="illuminapairedend.output.fastq" ftype="fastqsolexa"/>
+            <conditional name="options_grep">
+                <param name="options_grep_selector" value="lmin"/>
+                <param name="lmin" value="80"/>
+            </conditional>
+            <param name="v" value="true" />
+            <param name="options_inputtype" value="--sanger"/>
+            <param name="out_format" value="fastq" />
+            <output name="output" file="output_obigrep_lmin.fastq" ftype="fastqsanger"/>
+            <assert_command>
+                <has_text text="--sanger"/>
+            </assert_command>
+        </test>
+       <test expect_num_outputs="1">
+            <param name="input" value="illuminapairedend.output.fastq.gz" ftype="fastqsolexa.gz"/>
+            <conditional name="options_grep">
+                <param name="options_grep_selector" value="predicat"/>
+                <param name="predicat" value='mode!="joined"'/>
+            </conditional>
+            <param name="v" value="false" />
+            <param name="out_format" value="fasta" />
+            <output name="output" file="output_obigrep_predicat.fasta.gz" ftype="fasta.gz" decompress="true"/>
+            <assert_command>
+                <has_text text="--solexa"/>
+            </assert_command>
        </test>
    </tests>
     <help><![CDATA[