diff obigrep.xml @ 3:fe7ec8a3d35e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit 5d3c7a7b3f7d687bb03ef7993ddf1a6507d655bd"
author iuc
date Mon, 10 May 2021 19:33:38 +0000
parents 71cb8b117c05
children 02bab5ff7c37
line wrap: on
line diff
--- a/obigrep.xml	Thu Nov 28 15:52:09 2019 -0500
+++ b/obigrep.xml	Mon May 10 19:33:38 2021 +0000
@@ -1,169 +1,164 @@
-<tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@">
-    <description>Filters sequence file</description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements"/>
-    <expand macro="stdio"/>
-
-    <command>
-
-        <![CDATA[
-        obigrep
-        ${v}
-        #if str($options_grep.options_grep_selector) == 'sequence'
-            -s ${options_grep.sequence}
-        #else if str($options_grep.options_grep_selector) == 'definition'
-            -D ${options_grep.definition}
-        #else if str($options_grep.options_grep_selector) == 'identifier'
-            -I ${options_grep.identifier}
-        #else if str($options_grep.options_grep_selector) == 'idlist'
-            --id-list '$options_grep.idlist}
-        #else if str($options_grep.options_grep_selector) == 'attribute'
-            -a ${options_grep.attribute}
-        #else if str($options_grep.options_grep_selector) == 'hasattribute'
-            -A ${options_grep.attribute}
-        #else if str($options_grep.options_grep_selector) == 'predicat'
-            -p ${options_grep.predicat}
-        #else if str($options_grep.options_grep_selector) == 'lmax'
-            -L ${options_grep.lmax}
-        #else if str($options_grep.options_grep_selector) == 'lmin'
-            -l ${options_grep.lmin}
-        #end if
-        '$input' > '$output'
-        ]]>
-
-    </command>
-
-    <inputs>
-        <param name="input" type="data" format="fasta,fastq" label="Input sequences file" />
-        <conditional name="options_grep">
-            <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>
-                <option value="idlist">idlist</option>
-                <option value="attribute">attribute</option>
-                <option value="hasattribute">hasattribute</option>
-                <option value="predicat">predicat</option>
-                <option value="lmax">lmax</option>
-                <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>
-            </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>
-            </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" />
-                </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." />
-            </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>
-            </when>
-            <when value="hasattribute">
-                <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>
-            </when>
-            <when value="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="out_format" type="select" label="Output data type">
-            <option value="fasta">fasta</option>
-            <option value="fastq">fastq</option>
-        </param>
-
-    </inputs>
-    <outputs>
-        <data format="fastq" name="output" label="output with ${tool.name} on ${on_string}" >
-            <change_format>
-                <when input="out_format" value="fasta" format="fasta" />
-            </change_format>
-        </data>
-    </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="fastq"/>
-       </test>
-       <test>
-           <param name="input" value="illuminapairedend.output.fastq" />
-           <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" ftype="fasta"/>
-       </test>
-   </tests>
-    <help><![CDATA[
-
-.. class:: infomark
-
-**What it does**
-
-The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file.
-
-A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.
-
-Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements.
-
-Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected.
-
-Sequence record selection options :
-* sequence     : Regular expression pattern to be tested against the sequence itself. ex: GAATTC
-
-* definition   : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast
-
-* identifier   : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH
-
-* idlist       : points to a text file containing the list of sequence record identifiers to be selected.
-
-* attribute    : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae'
-
-* hasattribute : Selects sequence records having an attribute whose key = KEY.
-
-* predicat     : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined"
-
-* lmax         : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100
-
-* lmin         : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100
-
-@OBITOOLS_LINK@
-
-]]>
-
-    </help>
-    <expand macro="citation" />
-
-</tool>
+<tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@" profile="@PROFILE@">
+    <description>Filters sequence file</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <command><![CDATA[
+        @GUNZIP_INPUT@
+
+        obigrep
+        --without-progress-bar
+        ${v}
+        #if str($options_grep.options_grep_selector) == 'sequence'
+            -s ${options_grep.sequence}
+        #else if str($options_grep.options_grep_selector) == 'definition'
+            -D ${options_grep.definition}
+        #else if str($options_grep.options_grep_selector) == 'identifier'
+            -I ${options_grep.identifier}
+        #else if str($options_grep.options_grep_selector) == 'idlist'
+            --id-list '${options_grep.idlist}'
+        #else if str($options_grep.options_grep_selector) == 'attribute'
+            -a ${options_grep.attribute}
+        #else if str($options_grep.options_grep_selector) == 'hasattribute'
+            -A ${options_grep.attribute}
+        #else if str($options_grep.options_grep_selector) == 'predicat'
+            -p ${options_grep.predicat}
+        #else if str($options_grep.options_grep_selector) == 'lmax'
+            -L ${options_grep.lmax}
+        #else if str($options_grep.options_grep_selector) == 'lmin'
+            -l ${options_grep.lmin}
+        #end if
+        @INPUT_FORMAT@
+        @OUT_FORMAT@
+        input
+        @GZIP_OUTPUT@ 
+        > '$output'
+        @GENERATE_GALAXY_JSON@
+    ]]></command>
+    <inputs>
+        <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" >
+                <option value="sequence" selected="true">sequence</option>
+                <option value="definition">definition</option>
+                <option value="identifier">identifier</option>
+                <option value="idlist">idlist</option>
+                <option value="attribute">attribute</option>
+                <option value="hasattribute">hasattribute</option>
+                <option value="predicat">predicat</option>
+                <option value="lmax">lmax</option>
+                <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>
+            </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>
+            </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" />
+                </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." />
+            </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>
+            </when>
+            <when value="hasattribute">
+                <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>
+            </when>
+            <when value="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)" />
+        <expand macro="input_format_options_macro"/>
+        <expand macro="out_format_macro"/>
+    </inputs>
+    <outputs>
+        <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>
+   </tests>
+    <help><![CDATA[
+
+.. class:: infomark
+
+**What it does**
+
+The obigrep command is in some way analog to the standard Unix grep command. It selects a subset of sequence records from a sequence file.
+
+A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.
+
+Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements.
+
+Moreover obigrep allows specifying simultaneously several conditions (that take the value TRUE or FALSE) and only the sequence records that fulfill all the conditions (all conditions are TRUE) are selected.
+
+Sequence record selection options :
+* sequence     : Regular expression pattern to be tested against the sequence itself. ex: GAATTC
+
+* definition   : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast
+
+* identifier   : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH
+
+* idlist       : points to a text file containing the list of sequence record identifiers to be selected.
+
+* attribute    : Regular expression pattern matched against the attributes of the sequence record. the value of this attribute is of the form : key:regular_pattern. ex:'family_name:Asteraceae'
+
+* hasattribute : Selects sequence records having an attribute whose key = KEY.
+
+* predicat     : Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. ex: mode!="joined"
+
+* lmax         : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100
+
+* lmin         : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100
+
+@OBITOOLS_LINK@
+
+]]>
+
+    </help>
+    <expand macro="citation" />
+
+</tool>