comparison grep.xml @ 19:12615d397df7 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 70980e329cd9fa78e74bf14a76fd4ded9bd2b91f
author bgruening
date Thu, 29 Feb 2024 22:15:20 +0000
parents 74a8bef53a00
children fbf99087e067
comparison
equal deleted inserted replaced
18:d698c222f354 19:12615d397df7
1 <tool id="tp_grep_tool" name="Search in textfiles" version="@BASE_VERSION@.1"> 1 <tool id="tp_grep_tool" name="Search in textfiles" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>(grep)</description> 2 <description>(grep)</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="creator"/>
6 <requirements> 7 <requirements>
7 <requirement type="package" version="2.14">grep</requirement> 8 <requirement type="package" version="3.11">grep</requirement>
8 <requirement type="package" version="4.4">sed</requirement><!-- for ansi2html.sh --> 9 <requirement type="package" version="4.8">sed</requirement><!-- for ansi2html.sh -->
9 </requirements> 10 </requirements>
10 <version_command>grep --version | head -n 1</version_command> 11 <version_command>grep --version | head -n 1</version_command>
11 <command> 12 <command>
12 <![CDATA[ 13 <![CDATA[
13 #if str($color) == "COLOR": 14 #if str($color) == "COLOR":
17 $regex_type 18 $regex_type
18 -A $lines_after 19 -A $lines_after
19 -B $lines_before 20 -B $lines_before
20 $invert 21 $invert
21 $case_sensitive 22 $case_sensitive
22 -- "${url_paste}" 23 -- '${url_paste}'
23 '${infile}' | $__tool_directory__/ansi2html.sh > "${output}" 24 '${infile}' | '$__tool_directory__/ansi2html.sh' > '${output}'
24 #else: 25 #else:
25 grep 26 grep
26 $regex_type 27 $regex_type
27 -A $lines_after 28 -A $lines_after
28 -B $lines_before 29 -B $lines_before
29 $invert 30 $invert
30 $case_sensitive 31 $case_sensitive
31 -- "${url_paste}" 32 -- '${url_paste}'
32 '${infile}' | grep -v "^--$" > "${output}" 33 '${infile}' | grep -v "^--$" > '${output}'
33 #end if 34 #end if
34 ]]> 35 ]]>
35 </command> 36 </command>
36 <inputs> 37 <inputs>
37 <param name="infile" format="txt" type="data" label="Select lines from" /> 38 <param name="infile" format="txt" type="data" label="Select lines from" />
40 <option value="">Match</option> 41 <option value="">Match</option>
41 <option value="-v">Don't Match</option> 42 <option value="-v">Don't Match</option>
42 </param> 43 </param>
43 44
44 <param name="regex_type" type="select" label="Type of regex"> 45 <param name="regex_type" type="select" label="Type of regex">
45 <option value="-G">Basic</option> 46 <option value="-G">Basic (-G)</option>
46 <option value="-P" selected="true">Perl</option> 47 <option value="-P" selected="true">Perl (-P)</option>
47 <option value="-E">Extended (egrep)</option> 48 <option value="-E">Extended (egrep -E)</option>
48 </param> 49 </param>
49 50
50 <param name="url_paste" type="text" label="Regular Expression" help="See below for more details"> 51 <param name="url_paste" type="text" label="Regular Expression" help="See below for more details">
51 <sanitizer> 52 <sanitizer>
52 <valid initial="string.printable"> 53 <valid initial="string.printable">
111 <param name="lines_before" value="0" /> 112 <param name="lines_before" value="0" />
112 <param name="lines_after" value="0" /> 113 <param name="lines_after" value="0" />
113 <param name="color" value="NOCOLOR" /> 114 <param name="color" value="NOCOLOR" />
114 <output name="output" file="egrep_results1.txt" /> 115 <output name="output" file="egrep_results1.txt" />
115 </test> 116 </test>
116 <test><!-- same regex as egrep test, but different outcome with basic regex --> 117 <test><!-- tests basic regex; + must be backslashed to match -->
117 <param name="infile" value="egrep1.txt" /> 118 <param name="infile" value="egrep1.txt" />
118 <param name="case_sensitive" value="case sensitive" /> 119 <param name="case_sensitive" value="case sensitive" />
119 <param name="regex_type" value="-G" /> 120 <param name="regex_type" value="-G" />
120 <param name="invert" value="" /> 121 <param name="invert" value="" />
121 <param name="url_paste" value="[^ ]+" /> 122 <param name="url_paste" value="[^ ]\+" />
122 <param name="lines_before" value="0" /> 123 <param name="lines_before" value="0" />
123 <param name="lines_after" value="0" /> 124 <param name="lines_after" value="0" />
124 <param name="color" value="NOCOLOR" /> 125 <param name="color" value="NOCOLOR" />
125 <output name="output" file="egrep_results2.txt" /> 126 <output name="output" file="egrep_results1.txt" />
126 </test> 127 </test>
127 </tests> 128 </tests>
128 <help> 129 <help>
129 <![CDATA[ 130 <![CDATA[
130 **What it does** 131 **What it does**
185 - matches the beginning of a line or string. 186 - matches the beginning of a line or string.
186 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. 187 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets.
187 - **$** matches the end of a line or string. 188 - **$** matches the end of a line or string.
188 - **\|** Separates alternate possibilities. 189 - **\|** Separates alternate possibilities.
189 190
190 @REFERENCES@
191 ]]> 191 ]]>
192 </help> 192 </help>
193 <expand macro="citations" /> 193 <expand macro="citations" />
194 </tool> 194 </tool>