Mercurial > repos > saskia-hiltemann > file_manipulation
comparison filter_columns.xml @ 0:e77c9484b2d0 draft default tip
Uploaded
| author | saskia-hiltemann |
|---|---|
| date | Thu, 22 Oct 2015 09:18:30 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e77c9484b2d0 |
|---|---|
| 1 <tool id="filter_columns" name="Filter Columns" version="1.2"> | |
| 2 | |
| 3 <description> filter file based on column values </description> | |
| 4 | |
| 5 <command interpreter="bash"> | |
| 6 filter_columns.sh | |
| 7 --infile $infile | |
| 8 #for $f in $filters <!--get each var/mastervar file--> | |
| 9 --filter ${f.column},${f.condition},${f.value} | |
| 10 #end for | |
| 11 --outfile_rem $outputfile_removed | |
| 12 --outfile_ret $outputfile_retained | |
| 13 </command> | |
| 14 | |
| 15 <outputs> | |
| 16 <data format="input" name="outputfile_removed" label="${sample} - Removed lines Column filter on ${on_string}" metadata_source="infile"/> | |
| 17 <data format="input" name="outputfile_retained" label="${sample} - Retained lines Column filter on ${on_string}" metadata_source="infile"/> | |
| 18 </outputs> | |
| 19 | |
| 20 <inputs> | |
| 21 | |
| 22 <param name="infile" type="data" label="Select input file" help="expects header lines to be indicated by # or > symbols. First line is always considered header line"/> | |
| 23 | |
| 24 <repeat name="filters" title="Filter" min="1" help="Multiple filters: lines removed if match any of the filters, not all (rules are OR'd, not AND'd)"> | |
| 25 <param name="column" type="data_column" data_ref="infile" multiple="False" label="Select Column to filter on" /> | |
| 26 <param name="condition" type="select" label="Remove line if column value.." help="you will receive both file with retained lines and file with removed lines"> | |
| 27 <option value="nonempty"> non-empty </option> | |
| 28 <option value="empty" > empty </option> | |
| 29 <option value="equals" > equals (string or number) </option> | |
| 30 <option value="nequals" > not equals (string or number)</option> | |
| 31 <option value="contains"> contains (substring) </option> | |
| 32 <option value="ncontains"> does not contain (substring) </option> | |
| 33 <option value="gt" > greater than </option> | |
| 34 <option value="ge" > greater than or equals </option> | |
| 35 <option value="lt" > less than </option> | |
| 36 <option value="le" > less than or equals </option> | |
| 37 </param> | |
| 38 | |
| 39 | |
| 40 <param name="value" type="text" value="" label="enter number or string unless above option was set to empty or nonempty"/> | |
| 41 </repeat> | |
| 42 | |
| 43 <param name="sample" type="text" value="" label="Output File Name" help="Optional."/> | |
| 44 | |
| 45 </inputs> | |
| 46 | |
| 47 <help> | |
| 48 | |
| 49 **What it does** | |
| 50 Concatenates 2 files | |
| 51 | |
| 52 </help> | |
| 53 </tool> |
