comparison filter_tabular.xml @ 21:357fe86f245d draft

Uploaded
author jjohnson
date Fri, 14 Jul 2017 17:34:22 -0400
parents ab27c4bd14b9
children bed5018e7ae3
comparison
equal deleted inserted replaced
20:ab27c4bd14b9 21:357fe86f245d
1 <tool id="filter_tabular" name="Filter Tabular" version="5.0.0"> 1 <tool id="filter_tabular" name="Filter Tabular" version="1.0.0">
2 <description></description> 2 <description></description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 </macros> 6 </macros>
7 7
8 <requirements> 8 <requirements>
9 </requirements> 9 </requirements>
10 <stdio> 10 <command detect_errors="exit_code"><![CDATA[
11 <exit_code range="1:" /> 11 python '$__tool_directory__/filter_tabular.py'
12 </stdio>
13 <command><![CDATA[
14 python $__tool_directory__/filter_tabular.py
15 -i '$input' 12 -i '$input'
16 -j '$filter_json' 13 -j '$filter_json'
17 -o '$output' 14 -o '$output'
18 ]]></command> 15 ]]></command>
19 <configfiles> 16 <configfiles>
34 </outputs> 31 </outputs>
35 <tests> 32 <tests>
36 <test> 33 <test>
37 <param name="input" ftype="tabular" value="pets.tsv"/> 34 <param name="input" ftype="tabular" value="pets.tsv"/>
38 <repeat name="linefilters"> 35 <repeat name="linefilters">
39 <param name="filter_type" value="comment"/> 36 <conditional name="filter">
40 <param name="comment_char" value="35"/> 37 <param name="filter_type" value="regex"/>
38 <param name="regex_pattern" value="^\d+"/>
39 <param name="regex_action" value="include_find"/>
40 </conditional>
41 </repeat> 41 </repeat>
42 <repeat name="linefilters"> 42 <repeat name="linefilters">
43 <param name="filter_type" value="append_line_num"/> 43 <conditional name="filter">
44 <param name="filter_type" value="append_line_num"/>
45 </conditional>
44 </repeat> 46 </repeat>
45 <repeat name="linefilters"> 47 <repeat name="linefilters">
46 <param name="filter_type" value="select_columns"/> 48 <conditional name="filter">
47 <param name="columns" value="7,2,3,4,1"/> 49 <param name="filter_type" value="select_columns"/>
50 <param name="columns" value="7,2,3,4,1"/>
51 </conditional>
48 </repeat> 52 </repeat>
49 <repeat name="linefilters"> 53 <repeat name="linefilters">
50 <param name="filter_type" value="replace"/> 54 <conditional name="filter">
51 <param name="column" value="c4"/> 55 <param name="filter_type" value="replace"/>
52 <param name="regex_pattern" value="(\d+)/(\d+)/(\d+)"/> 56 <param name="column" value="c4"/>
53 <param name="regex_replace" value="19\3-\2-\1"/> 57 <param name="regex_pattern" value="(\d+)/(\d+)/(\d+)"/>
58 <param name="regex_replace" value="19\3-\2-\1"/>
59 </conditional>
54 </repeat> 60 </repeat>
55 <output name="output" file="filtered_people_results.tsv"/> 61 <output name="output" file="filtered_people_results.tsv"/>
56 </test> 62 </test>
57 <test> 63 <test>
58 <param name="input" ftype="tabular" value="pets.tsv"/> 64 <param name="input" ftype="tabular" value="pets.tsv"/>
59 <repeat name="linefilters"> 65 <repeat name="linefilters">
60 <param name="filter_type" value="comment"/> 66 <conditional name="filter">
61 <param name="comment_char" value="35"/> 67 <param name="filter_type" value="comment"/>
68 <param name="comment_char" value="35"/>
69 </conditional>
62 </repeat> 70 </repeat>
63 <repeat name="linefilters"> 71 <repeat name="linefilters">
64 <param name="filter_type" value="append_line_num"/> 72 <conditional name="filter">
73 <param name="filter_type" value="regex"/>
74 <param name="regex_pattern" value="^\d+"/>
75 <param name="regex_action" value="include_find"/>
76 </conditional>
65 </repeat> 77 </repeat>
66 <repeat name="linefilters"> 78 <repeat name="linefilters">
67 <param name="filter_type" value="select_columns"/> 79 <conditional name="filter">
68 <param name="columns" value="c7,c5,c6"/> 80 <param name="filter_type" value="append_line_num"/>
81 </conditional>
69 </repeat> 82 </repeat>
70 <repeat name="linefilters"> 83 <repeat name="linefilters">
71 <param name="filter_type" value="normalize"/> 84 <conditional name="filter">
72 <param name="columns" value="c2,c3"/> 85 <param name="filter_type" value="select_columns"/>
73 <param name="separator" value=","/> 86 <param name="columns" value="c7,c5,c6"/>
87 </conditional>
88 </repeat>
89 <repeat name="linefilters">
90 <conditional name="filter">
91 <param name="filter_type" value="normalize"/>
92 <param name="columns" value="c2,c3"/>
93 <param name="separator" value=","/>
94 </conditional>
95 </repeat>
96 <repeat name="linefilters">
97 <conditional name="filter">
98 <param name="filter_type" value="regex"/>
99 <param name="regex_pattern" value="^\d+\t\t"/>
100 <param name="regex_action" value="exclude_match"/>
101 </conditional>
74 </repeat> 102 </repeat>
75 <output name="output" file="filtered_pets_results.tsv"/> 103 <output name="output" file="filtered_pets_results.tsv"/>
76 </test> 104 </test>
77 105
78 </tests> 106 </tests>