Mercurial > repos > iuc > filter_tabular
comparison filter_tabular.xml @ 0:c0c0226e1c9c draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/query_tabular commit 74915fc9cee746bbce1c4b507e13231259de177d
| author | iuc |
|---|---|
| date | Tue, 18 Jul 2017 09:05:41 -0400 |
| parents | |
| children | fb97505cc3a8 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:c0c0226e1c9c |
|---|---|
| 1 <tool id="filter_tabular" name="Filter Tabular" version="1.0.0"> | |
| 2 <description></description> | |
| 3 | |
| 4 <macros> | |
| 5 <import>macros.xml</import> | |
| 6 </macros> | |
| 7 | |
| 8 <requirements> | |
| 9 </requirements> | |
| 10 <command detect_errors="exit_code"><![CDATA[ | |
| 11 python '$__tool_directory__/filter_tabular.py' | |
| 12 -i '$input' | |
| 13 -j '$filter_json' | |
| 14 -o '$output' | |
| 15 ]]></command> | |
| 16 <configfiles> | |
| 17 <configfile name="filter_json"> | |
| 18 #import json | |
| 19 @LINEFILTERS@ | |
| 20 #if $input_filters: | |
| 21 #echo $json.dumps($input_filters) | |
| 22 #end if | |
| 23 </configfile> | |
| 24 </configfiles> | |
| 25 <inputs> | |
| 26 <param name="input" type="data" format="tabular" label="Tabular Dataset to filter"/> | |
| 27 <expand macro="macro_line_filters" /> | |
| 28 </inputs> | |
| 29 <outputs> | |
| 30 <data format="tabular" name="output" /> | |
| 31 </outputs> | |
| 32 <tests> | |
| 33 <test> | |
| 34 <param name="input" ftype="tabular" value="pets.tsv"/> | |
| 35 <repeat name="linefilters"> | |
| 36 <conditional name="filter"> | |
| 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> | |
| 42 <repeat name="linefilters"> | |
| 43 <conditional name="filter"> | |
| 44 <param name="filter_type" value="append_line_num"/> | |
| 45 </conditional> | |
| 46 </repeat> | |
| 47 <repeat name="linefilters"> | |
| 48 <conditional name="filter"> | |
| 49 <param name="filter_type" value="select_columns"/> | |
| 50 <param name="columns" value="7,2,3,4,1"/> | |
| 51 </conditional> | |
| 52 </repeat> | |
| 53 <repeat name="linefilters"> | |
| 54 <conditional name="filter"> | |
| 55 <param name="filter_type" value="replace"/> | |
| 56 <param name="column" value="c4"/> | |
| 57 <param name="regex_pattern" value="(\d+)/(\d+)/(\d+)"/> | |
| 58 <param name="regex_replace" value="19\3-\2-\1"/> | |
| 59 </conditional> | |
| 60 </repeat> | |
| 61 <output name="output" file="filtered_people_results.tsv"/> | |
| 62 </test> | |
| 63 <test> | |
| 64 <param name="input" ftype="tabular" value="pets.tsv"/> | |
| 65 <repeat name="linefilters"> | |
| 66 <conditional name="filter"> | |
| 67 <param name="filter_type" value="comment"/> | |
| 68 <param name="comment_char" value="35"/> | |
| 69 </conditional> | |
| 70 </repeat> | |
| 71 <repeat name="linefilters"> | |
| 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> | |
| 77 </repeat> | |
| 78 <repeat name="linefilters"> | |
| 79 <conditional name="filter"> | |
| 80 <param name="filter_type" value="append_line_num"/> | |
| 81 </conditional> | |
| 82 </repeat> | |
| 83 <repeat name="linefilters"> | |
| 84 <conditional name="filter"> | |
| 85 <param name="filter_type" value="select_columns"/> | |
| 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> | |
| 102 </repeat> | |
| 103 <output name="output" file="filtered_pets_results.tsv"/> | |
| 104 </test> | |
| 105 | |
| 106 </tests> | |
| 107 <help><![CDATA[ | |
| 108 ============== | |
| 109 Filter Tabular | |
| 110 ============== | |
| 111 | |
| 112 Filter a tabular dataset by applying line filters as it is being read. | |
| 113 Multiple filters may be used with each filter using the result of the previous filter. | |
| 114 | |
| 115 **Inputs** | |
| 116 | |
| 117 A tabular dataset. | |
| 118 | |
| 119 | |
| 120 **Outputs** | |
| 121 | |
| 122 A filtered tabular dataset. | |
| 123 | |
| 124 | |
| 125 @LINEFILTERS_HELP@ | |
| 126 | |
| 127 @LINEFILTERS_HELP_EXAMPLE@ | |
| 128 | |
| 129 ]]></help> | |
| 130 </tool> |
