annotate tools/unix_tools/word_list_grep.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="cshl_word_list_grep" name="Select lines">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>by word list</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="perl">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 word_list_grep.pl
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 #if $searchwhere.choice == "column":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 -c $searchwhere.column
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 -o $output
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 $inverse
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 $caseinsensitive
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 $wholewords
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 $skip_first_line
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 $wordlist
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 $input
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="input" format="txt" type="data" label="input file" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <param name="wordlist" format="txt" type="data" label="word list file" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <param name="inverse" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Inverse filter"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 help="Report lines NOT matching the word list" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <param name="caseinsensitive" type="boolean" checked="false" truevalue="-i" falsevalue="" label="Case-Insensitive search"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 help="" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="wholewords" type="boolean" checked="false" truevalue="-w" falsevalue="" label="find whole-words"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 help="ignore partial matches (e.g. 'apple' will not match 'snapple') " />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <param name="skip_first_line" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Ignore first line"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 help="Select this option if the first line contains column headers. First line will not be filtered. " />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <conditional name="searchwhere">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <param name="choice" type="select" label="Search words in">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <option value="line" selected="true">entire line</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <option value="column">specific column</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <when value="line">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <when value="column">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <param name="column" label="in column" type="data_column" data_ref="input" accept_default="true" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <data name="output" format="input" metadata_source="input" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 This tool selects lines that match words from a word list.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 --------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 Input file (UCSC's rmsk track from dm3)::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 585 787 66 241 11 chrXHet 2860 3009 -201103 - DNAREP1_DM LINE Penelope 0 594 435 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 585 1383 78 220 0 chrXHet 3012 3320 -200792 - DNAREP1_DM LINE Penelope -217 377 2 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 585 244 103 0 0 chrXHet 3737 3776 -200336 - DNAREP1_DM LINE Penelope -555 39 1 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 585 2270 83 144 0 chrXHet 7907 8426 -195686 + DNAREP1_DM LINE Penelope 1 594 0 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 585 617 189 73 68 chrXHet 10466 10671 -193441 + DNAREP1_DM LINE Penelope 368 573 -21 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 586 1122 71 185 0 chrXHet 173138 173322 -30790 - PROTOP DNA P -4033 447 230 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 Word list file::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 STALKER
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 PROTOP
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 Output sequence (searching in column 11)::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 586 1122 71 185 0 chrXHet 173138 173322 -30790 - PROTOP DNA P -4033 447 230 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 586 228 162 0 0 chrXHet 181026 181063 -23049 + STALKER4_I LTR Gypsy 9 45 -6485 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 585 245 105 26 0 chr3R 41609 41647 -27863406 + PROTOP_B DNA P 507 545 -608 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 586 238 91 0 0 chr3R 140224 140257 -27764796 - PROTOP_B DNA P -617 536 504 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 ( With **find whole-words** not selected, *PROTOP* matched *PROTOP_B*, *STALKER* matched *STALKER4_I* )
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 Output sequence (searching in column 11, and whole-words only)::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 586 670 90 38 57 chrXHet 168356 168462 -35650 - PROTOP DNA P -459 4021 3918 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 586 413 139 70 0 chrXHet 168462 168548 -35564 - PROTOP DNA P -3406 1074 983 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 586 1122 71 185 0 chrXHet 173138 173322 -30790 - PROTOP DNA P -4033 447 230 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 ...
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 </tool>