diff grep.xml @ 3:37e1eb05b1b4 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
author bgruening
date Fri, 26 Feb 2016 12:22:19 -0500
parents 43b1f073b693
children 20344ce0c811
line wrap: on
line diff
--- a/grep.xml	Tue Jun 30 17:47:23 2015 -0400
+++ b/grep.xml	Fri Feb 26 12:22:19 2016 -0500
@@ -13,7 +13,7 @@
             GREP_COLOR='1;34'
             grep
                 --color=always
-                -P
+                $regex_type
                 -A $lines_after
                 -B $lines_before
                 $invert
@@ -22,7 +22,7 @@
                 '${infile}' | $__tool_directory__/ansi2html.sh > "${output}"
         #else:
             grep
-                -P
+                $regex_type
                 -A $lines_after
                 -B $lines_before
                 $invert
@@ -41,8 +41,14 @@
             <option value="">Match</option>
             <option value="-v">Don't Match</option>
         </param>
-
-        <param name="url_paste" type="text" size="40" label="Regular Expression" help="See below for more details">
+        
+        <param name="regex_type" type="select" label="Type of regex">
+            <option value="-G">Basic</option>
+            <option value="-P" selected="true">Perl</option>
+            <option value="-E">Extended (egrep)</option>
+        </param>
+        
+        <param name="url_paste" type="text" label="Regular Expression" help="See below for more details">
             <sanitizer>
                 <valid initial="string.printable">
                     <remove value="&apos;"/>
@@ -76,6 +82,7 @@
             <!-- grep a FASTA file for sequences with specific motif -->
             <param name="infile" value="grep1.txt" />
             <param name="case_sensitive" value="case sensitive" />
+            <param name="regex_type" value="-P" />
             <param name="invert" value="" />
             <param name="url_paste" value="AA.{2}GT" />
             <param name="lines_before" value="1" />
@@ -88,6 +95,7 @@
              show highlighed output -->
             <param name="infile" value="grep1.txt" />
             <param name="case_sensitive" value="case sensitive" />
+            <param name="regex_type" value="-P" />
             <param name="invert" value="" />
             <param name="url_paste" value="AA.{2}GT" />
             <param name="lines_before" value="0" />
@@ -95,6 +103,28 @@
             <param name="color" value="COLOR" />
             <output name="output" file="grep_results2.html" />
         </test>
+        <test><!-- tests egrep -->
+            <param name="infile" value="egrep1.txt" />
+            <param name="case_sensitive" value="case sensitive" />
+            <param name="regex_type" value="-E" />
+            <param name="invert" value="" />
+            <param name="url_paste" value="[^ ]+" />
+            <param name="lines_before" value="0" />
+            <param name="lines_after" value="0" />
+            <param name="color" value="NOCOLOR" />
+            <output name="output" file="egrep_results1.txt" />
+        </test>
+        <test><!-- same regex as egrep test, but different outcome with basic regex -->
+            <param name="infile" value="egrep1.txt" />
+            <param name="case_sensitive" value="case sensitive" />
+            <param name="regex_type" value="-G" />
+            <param name="invert" value="" />
+            <param name="url_paste" value="[^ ]+" />
+            <param name="lines_before" value="0" />
+            <param name="lines_after" value="0" />
+            <param name="color" value="NOCOLOR" />
+            <output name="output" file="egrep_results2.txt" />>
+        </test>
     </tests>
     <help>
 <![CDATA[