annotate grep.xml @ 18:1e974b82380d draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
author bgruening
date Tue, 27 Feb 2018 17:10:53 -0500
parents 7725ab6dab67
children f22a309187a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
1e974b82380d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
bgruening
parents: 14
diff changeset
1 <tool id="tp_grep_tool" name="Search in textfiles" version="@BASE_VERSION@.1">
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
2 <description>(grep)</description>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
3 <macros>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
4 <import>macros.xml</import>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
5 </macros>
13
3c685c4106b3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents: 12
diff changeset
6 <requirements>
12
062ed2bb4f2e planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit f8896018f5b980a456c4ceaffe0ed457dc80b5a8
bgruening
parents: 10
diff changeset
7 <requirement type="package" version="2.14">grep</requirement>
18
1e974b82380d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
bgruening
parents: 14
diff changeset
8 <requirement type="package" version="4.4">sed</requirement><!-- for ansi2html.sh -->
13
3c685c4106b3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents: 12
diff changeset
9 </requirements>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
10 <version_command>grep --version | head -n 1</version_command>
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
11 <command>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
12 <![CDATA[
2
fc862d5bccaf Uploaded
bgruening
parents: 1
diff changeset
13 #if str($color) == "COLOR":
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
14 GREP_COLOR='1;34'
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
15 grep
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
16 --color=always
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
17 $regex_type
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
18 -A $lines_after
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
19 -B $lines_before
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
20 $invert
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
21 $case_sensitive
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
22 -- "${url_paste}"
8
fa7f88da29d7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
bgruening
parents: 7
diff changeset
23 '${infile}' | $__tool_directory__/ansi2html.sh > "${output}"
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
24 #else:
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
25 grep
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
26 $regex_type
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
27 -A $lines_after
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
28 -B $lines_before
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
29 $invert
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
30 $case_sensitive
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
31 -- "${url_paste}"
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
32 '${infile}' | grep -v "^--$" > "${output}"
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
33 #end if
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
34 ]]>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
35 </command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
36 <inputs>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
37 <param name="infile" format="txt" type="data" label="Select lines from" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
38
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
39 <param name="invert" type="select" label="that">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
40 <option value="">Match</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
41 <option value="-v">Don't Match</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
42 </param>
18
1e974b82380d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
bgruening
parents: 14
diff changeset
43
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
44 <param name="regex_type" type="select" label="Type of regex">
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
45 <option value="-G">Basic</option>
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
46 <option value="-P" selected="true">Perl</option>
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
47 <option value="-E">Extended (egrep)</option>
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
48 </param>
18
1e974b82380d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 0ba37c1f33eeb1c77b4d9363d681fe522d9f7fe7
bgruening
parents: 14
diff changeset
49
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
50 <param name="url_paste" type="text" label="Regular Expression" help="See below for more details">
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
51 <sanitizer>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
52 <valid initial="string.printable">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
53 <remove value="&apos;"/>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
54 </valid>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
55 </sanitizer>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
56 </param>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
57
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
58 <param name="case_sensitive" type="select" label="Match type" help="(-i)">
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
59 <option value="-i">case insensitive</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
60 <option value="">case sensitive</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
61 </param>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
62 <param name="lines_before" type="integer" value="0"
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
63 label="Show lines preceding the matched line" help="leave it at zero unless you know what you're doing. (-B)" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
64 <param name="lines_after" type="integer" value="0"
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
65 label="Show lines trailing the matched line" help="leave it at zero unless you know what you're doing. (-A)" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
66 <param name="color" type="select" label="Output">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
67 <option value="NOCOLOR">text file (for further processing)</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
68 <option value="COLOR">Highlighted HTML (for easier viewing)</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
69 </param>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
70
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
71 </inputs>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
72 <outputs>
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
73 <data name="output" format_source="infile" metadata_source="infile">
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
74 <change_format>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
75 <when input="color" value="COLOR" format="html"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
76 </change_format>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
77 </data>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
78 </outputs>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
79 <tests>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
80 <test>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
81 <!-- grep a FASTA file for sequences with specific motif -->
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
82 <param name="infile" value="grep1.txt" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
83 <param name="case_sensitive" value="case sensitive" />
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
84 <param name="regex_type" value="-P" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
85 <param name="invert" value="" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
86 <param name="url_paste" value="AA.{2}GT" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
87 <param name="lines_before" value="1" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
88 <param name="lines_after" value="0" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
89 <param name="color" value="NOCOLOR" />
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
90 <output name="output" file="grep_results1.txt" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
91 </test>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
92 <test>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
93 <!-- grep a FASTA file for sequences with specific motif -
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
94 show highlighed output -->
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
95 <param name="infile" value="grep1.txt" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
96 <param name="case_sensitive" value="case sensitive" />
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
97 <param name="regex_type" value="-P" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
98 <param name="invert" value="" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
99 <param name="url_paste" value="AA.{2}GT" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
100 <param name="lines_before" value="0" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
101 <param name="lines_after" value="0" />
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
102 <param name="color" value="COLOR" />
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
103 <output name="output" file="grep_results2.html" />
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
104 </test>
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
105 <test><!-- tests egrep -->
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
106 <param name="infile" value="egrep1.txt" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
107 <param name="case_sensitive" value="case sensitive" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
108 <param name="regex_type" value="-E" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
109 <param name="invert" value="" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
110 <param name="url_paste" value="[^ ]+" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
111 <param name="lines_before" value="0" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
112 <param name="lines_after" value="0" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
113 <param name="color" value="NOCOLOR" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
114 <output name="output" file="egrep_results1.txt" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
115 </test>
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
116 <test><!-- same regex as egrep test, but different outcome with basic regex -->
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
117 <param name="infile" value="egrep1.txt" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
118 <param name="case_sensitive" value="case sensitive" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
119 <param name="regex_type" value="-G" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
120 <param name="invert" value="" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
121 <param name="url_paste" value="[^ ]+" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
122 <param name="lines_before" value="0" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
123 <param name="lines_after" value="0" />
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
124 <param name="color" value="NOCOLOR" />
13
3c685c4106b3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
bgruening
parents: 12
diff changeset
125 <output name="output" file="egrep_results2.txt" />
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
126 </test>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
127 </tests>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
128 <help>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
129 <![CDATA[
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
130 **What it does**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
131
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
132 This tool runs the unix **grep** command on the selected data file.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
133
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
134 .. class:: infomark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
135
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
136 **TIP:** This tool uses the **perl** regular expression syntax (same as running 'grep -P'). This is **NOT** the POSIX or POSIX-extended syntax (unlike the awk/sed tools).
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
137
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
138
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
139 **Further reading**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
140
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
141 - Wikipedia's Regular Expression page (http://en.wikipedia.org/wiki/Regular_expression)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
142 - Regular Expressions cheat-sheet (PDF) (http://www.addedbytes.com/cheat-sheets/download/regular-expressions-cheat-sheet-v2.pdf)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
143 - Grep Tutorial (http://www.panix.com/~elflord/unix/grep.html)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
144
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
145 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
146
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
147 **Grep Examples**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
148
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
149 - **AGC.AAT** would match lines with AGC followed by any character, followed by AAT (e.g. **AGCQAAT**, **AGCPAAT**, **AGCwAAT**)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
150 - **C{2,5}AGC** would match lines with 2 to 5 consecutive Cs followed by AGC
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
151 - **TTT.{4,10}AAA** would match lines with 3 Ts, followed by 4 to 10 characters (any characeters), followed by 3 As.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
152 - **^chr([0-9A-Za-z])+** would match lines that begin with chromsomes, such as lines in a BED format file.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
153 - **(ACGT){1,5}** would match at least 1 "ACGT" and at most 5 "ACGT" consecutively.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
154 - **hsa|mmu** would match lines containing "hsa" or "mmu" (or both).
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
155
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
156 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
157
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
158 **Regular Expression Syntax**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
159
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
160 The select tool searches the data for lines containing or not containing a match to the given pattern. A Regular Expression is a pattern descibing a certain amount of text.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
161
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
162 - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
163 - **^** matches the beginning of a string(but not an internal line).
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
164 - **\\d** matches a digit, same as [0-9].
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
165 - **\\D** matches a non-digit.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
166 - **\\s** matches a whitespace character.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
167 - **\\S** matches anything BUT a whitespace.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
168 - **\\t** matches a tab.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
169 - **\\w** matches an alphanumeric character ( A to Z, 0 to 9 and underscore )
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
170 - **\\W** matches anything but an alphanumeric character.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
171 - **(** .. **)** groups a particular pattern.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
172 - **\\Z** matches the end of a string(but not a internal line).
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
173 - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
174
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
175 - **{n}** The preceding item is matched exactly n times.
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
176 - **{n,}** The preceding item ismatched n or more times.
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
177 - **{n,m}** The preceding item is matched at least n times but not more than m times.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
178
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
179 - **[** ... **]** creates a character class. Within the brackets, single characters can be placed. A dash (-) may be used to indicate a range such as **a-z**.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
180 - **.** Matches any single character except a newline.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
181 - ***** The preceding item will be matched zero or more times.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
182 - **?** The preceding item is optional and matched at most once.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
183 - **+** The preceding item will be matched one or more times.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
184 - **^** has two meaning:
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
185 - matches the beginning of a line or string.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
186 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
187 - **$** matches the end of a line or string.
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
188 - **\|** Separates alternate possibilities.
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
189
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
190 @REFERENCES@
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
191 ]]>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
192 </help>
14
7725ab6dab67 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
bgruening
parents: 13
diff changeset
193 <expand macro="citations" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
194 </tool>