Repository 'obi_grep'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/obi_grep

Changeset 4:02bab5ff7c37 (2024-03-20)
Previous changeset 3:fe7ec8a3d35e (2021-05-10)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit dabf62d438facc62f3e606ff4419092fdcdfaa44
modified:
macros.xml
obigrep.xml
test-data/input_ngsfilter_extrafile.txt
b
diff -r fe7ec8a3d35e -r 02bab5ff7c37 macros.xml
--- a/macros.xml Mon May 10 19:33:38 2021 +0000
+++ b/macros.xml Wed Mar 20 13:17:23 2024 +0000
b
@@ -5,7 +5,11 @@
             <requirement type="package" version="@TOOL_VERSION@">obitools</requirement>
         </requirements>
     </xml>
-
+    <xml name="bio_tools">
+        <xrefs>
+            <xref type="bio.tools">obitools</xref>
+        </xrefs>
+    </xml>
     <token name="@TOOL_VERSION@">1.2.13</token>
     <token name="@PROFILE@">21.01</token>
 
b
diff -r fe7ec8a3d35e -r 02bab5ff7c37 obigrep.xml
--- a/obigrep.xml Mon May 10 19:33:38 2021 +0000
+++ b/obigrep.xml Wed Mar 20 13:17:23 2024 +0000
[
b'@@ -1,164 +1,175 @@\n-<tool id="obi_grep" name="obigrep" version="@TOOL_VERSION@" profile="@PROFILE@">\n-    <description>Filters sequence file</description>\n-    <macros>\n-        <import>macros.xml</import>\n-    </macros>\n-    <expand macro="requirements"/>\n-    <expand macro="stdio"/>\n-    <command><![CDATA[\n-        @GUNZIP_INPUT@\n-\n-        obigrep\n-        --without-progress-bar\n-        ${v}\n-        #if str($options_grep.options_grep_selector) == \'sequence\'\n-            -s ${options_grep.sequence}\n-        #else if str($options_grep.options_grep_selector) == \'definition\'\n-            -D ${options_grep.definition}\n-        #else if str($options_grep.options_grep_selector) == \'identifier\'\n-            -I ${options_grep.identifier}\n-        #else if str($options_grep.options_grep_selector) == \'idlist\'\n-            --id-list \'${options_grep.idlist}\'\n-        #else if str($options_grep.options_grep_selector) == \'attribute\'\n-            -a ${options_grep.attribute}\n-        #else if str($options_grep.options_grep_selector) == \'hasattribute\'\n-            -A ${options_grep.attribute}\n-        #else if str($options_grep.options_grep_selector) == \'predicat\'\n-            -p ${options_grep.predicat}\n-        #else if str($options_grep.options_grep_selector) == \'lmax\'\n-            -L ${options_grep.lmax}\n-        #else if str($options_grep.options_grep_selector) == \'lmin\'\n-            -l ${options_grep.lmin}\n-        #end if\n-        @INPUT_FORMAT@\n-        @OUT_FORMAT@\n-        input\n-        @GZIP_OUTPUT@ \n-        > \'$output\'\n-        @GENERATE_GALAXY_JSON@\n-    ]]></command>\n-    <inputs>\n-        <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file" />\n-        <conditional name="options_grep">\n-            <param name="options_grep_selector" type="select" label="Choose the sequence record selection option" >\n-                <option value="sequence" selected="true">sequence</option>\n-                <option value="definition">definition</option>\n-                <option value="identifier">identifier</option>\n-                <option value="idlist">idlist</option>\n-                <option value="attribute">attribute</option>\n-                <option value="hasattribute">hasattribute</option>\n-                <option value="predicat">predicat</option>\n-                <option value="lmax">lmax</option>\n-                <option value="lmin">lmin</option>\n-            </param>\n-            <when value="sequence">\n-                <param name="sequence" type="text" label="Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive." >\n-                    <expand macro="sanitizer" />\n-                </param>\n-            </when>\n-            <when value="definition">\n-                <param name="definition" type="text" label="Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive." >\n-                    <expand macro="sanitizer" />\n-                </param>\n-            </when>\n-            <when value="identifier">\n-                <param name="identifier" type="text" label="Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive." >\n-                    <expand macro="sanitizer" />\n-                </param>\n-            </when>\n-            <when value="idlist">\n-                <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." />\n-            </when>\n-            <when value="attribute">\n-                <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." >\n-                    <expand macro="sanitizer" />\n-  '..b'\n+    <outputs>\r\n+        <data format="auto" name="output"/>\r\n+    </outputs>\r\n+    <tests>\r\n+        <test expect_num_outputs="1">\r\n+            <!-- since the test data has large qualities it is sniffed as generic fastq which\r\n+                 is not accepted py the parameter so the ftype is set, in this test we\r\n+                 overwrite tis with the options_inputtype parameter and check if its set\r\n+                 correctly on the CLI-->\r\n+            <param name="input" value="illuminapairedend.output.fastq" ftype="fastqsolexa"/>\r\n+            <conditional name="options_grep">\r\n+                <param name="options_grep_selector" value="lmin"/>\r\n+                <param name="lmin" value="80"/>\r\n+            </conditional>\r\n+            <param name="v" value="true" />\r\n+            <param name="options_inputtype" value="--sanger"/>\r\n+            <param name="out_format" value="fastq" />\r\n+            <output name="output" file="output_obigrep_lmin.fastq" ftype="fastqsanger"/>\r\n+            <assert_command>\r\n+                <has_text text="--sanger"/>\r\n+            </assert_command>\r\n+        </test>\r\n+       <test expect_num_outputs="1">\r\n+            <param name="input" value="illuminapairedend.output.fastq.gz" ftype="fastqsolexa.gz"/>\r\n+            <conditional name="options_grep">\r\n+                <param name="options_grep_selector" value="predicat"/>\r\n+                <param name="predicat" value=\'mode!="joined"\'/>\r\n+            </conditional>\r\n+            <param name="v" value="false" />\r\n+            <param name="out_format" value="fasta" />\r\n+            <output name="output" file="output_obigrep_predicat.fasta.gz" ftype="fasta.gz" decompress="true"/>\r\n+            <assert_command>\r\n+                <has_text text="--solexa"/>\r\n+            </assert_command>\r\n+       </test>\r\n+   </tests>\r\n+    <help><![CDATA[\r\n+\r\n+.. class:: infomark\r\n+\r\n+**What it does**\r\n+\r\n+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.\r\n+\r\n+A sequence record is a complex object composed of an identifier, a set of attributes (key=value), a definition, and the sequence itself.\r\n+\r\n+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.\r\n+\r\n+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.\r\n+\r\n+Sequence record selection options :\r\n+* sequence     : Regular expression pattern to be tested against the sequence itself. ex: GAATTC\r\n+\r\n+* definition   : Regular expression pattern to be tested against the definition of the sequence record. ex: [Cc]hloroplast\r\n+\r\n+* identifier   : Regular expression pattern to be tested against the identifier of the sequence record. ex: ^GH\r\n+\r\n+* idlist       : points to a text file containing the list of sequence record identifiers to be selected.\r\n+\r\n+* 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\'\r\n+\r\n+* hasattribute : Selects sequence records having an attribute whose key = KEY.\r\n+\r\n+* 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 \xe2\x80\x98sequence\xe2\x80\x99 refers to the sequence record itself. ex: mode!="joined"\r\n+\r\n+* lmax         : Keeps sequence records whose sequence length is equal or shorter than lmax. ex : 100\r\n+\r\n+* lmin         : Selects sequence records whose sequence length is equal or longer than lmin. ex : 100\r\n+\r\n+@OBITOOLS_LINK@\r\n+\r\n+]]>\r\n+\r\n+    </help>\r\n+    <expand macro="citation" />\r\n+\r\n+</tool>\r\n'
b
diff -r fe7ec8a3d35e -r 02bab5ff7c37 test-data/input_ngsfilter_extrafile.txt
--- a/test-data/input_ngsfilter_extrafile.txt Mon May 10 19:33:38 2021 +0000
+++ b/test-data/input_ngsfilter_extrafile.txt Wed Mar 20 13:17:23 2024 +0000
b
@@ -1,4 +1,4 @@
-wolf_diet    13a_F730603      aattaac  TTAGATACCCCACTATGC    TAGAACAGGCTCCTCTAG     F       @
-wolf_diet    15a_F730814      gaagtag  TTAGATACCCCACTATGC    TAGAACAGGCTCCTCTAG     F       @
-wolf_diet    26a_F040644      gaatatc  TTAGATACCCCACTATGC    TAGAACAGGCTCCTCTAG     F       @
-wolf_diet    29a_F260619      gcctcct  TTAGATACCCCACTATGC    TAGAACAGGCTCCTCTAG     F       @
+wolf_diet 13a_F730603 aattaac TTAGATACCCCACTATGC TAGAACAGGCTCCTCTAG F @
+wolf_diet 15a_F730814 gaagtag TTAGATACCCCACTATGC TAGAACAGGCTCCTCTAG F @
+wolf_diet 26a_F040644 gaatatc TTAGATACCCCACTATGC TAGAACAGGCTCCTCTAG F @
+wolf_diet 29a_F260619 gcctcct TTAGATACCCCACTATGC TAGAACAGGCTCCTCTAG F @