Mercurial > repos > jjohnson > split_tabular_columns
comparison split_tabular_columns.xml @ 0:d43312f961cc draft default tip
planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/split_tabular_columns commit 1d5750b99b90bb1d2730c816a95849e9b9a7d2f9-dirty
| author | jjohnson |
|---|---|
| date | Wed, 01 Mar 2017 14:01:57 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:d43312f961cc |
|---|---|
| 1 <tool id="split_tabular_columns" name="Split Tabular Columns" version="0.0.1"> | |
| 2 <description>into multiple rows to create a normalized table</description> | |
| 3 <requirements> | |
| 4 </requirements> | |
| 5 <stdio> | |
| 6 <exit_code range="1:" /> | |
| 7 </stdio> | |
| 8 <command interpreter="python"><![CDATA[ | |
| 9 #set $delim = str($split_on).replace("'","\'") | |
| 10 split_tabular_columns.py | |
| 11 --input="$input" | |
| 12 --split_on='${delim}' | |
| 13 #for $col in str($columns).split(","): | |
| 14 --column=$col | |
| 15 #end for | |
| 16 --output="$output" | |
| 17 ]]></command> | |
| 18 <inputs> | |
| 19 <param name="input" type="data" format="tabular" label="Tabular Dataset to normalize"/> | |
| 20 <param name="columns" type="data_column" data_ref="input" multiple="True" label="Columns to split" | |
| 21 help=""/> | |
| 22 <param name="split_on" type="text" value="," label="List delimiter in column"> | |
| 23 <sanitizer sanitize="False"/> | |
| 24 <validator type="regex" message="Anything but TAB or Newline">^[^\t\n\r\f\v]+$</validator> | |
| 25 </param> | |
| 26 </inputs> | |
| 27 <outputs> | |
| 28 <data format="tabular" name="output" label="${input.name} normalized"/> | |
| 29 </outputs> | |
| 30 <tests> | |
| 31 | |
| 32 <test> | |
| 33 <param name="input" ftype="tabular" value="input.tabular"/> | |
| 34 <param name="columns" value="7,8"/> | |
| 35 <param name="split_on" value="; "/> | |
| 36 <output name="output" file="output.tabular"/> | |
| 37 </test> | |
| 38 </tests> | |
| 39 <help><![CDATA[ | |
| 40 ===================== | |
| 41 Split Tabular Columns | |
| 42 ===================== | |
| 43 | |
| 44 **Inputs** | |
| 45 | |
| 46 Tabular dataset containing one or more columns with a list. | |
| 47 | |
| 48 **Outputs** | |
| 49 | |
| 50 Normalized Tabular dataset containing one or more columns with a list. | |
| 51 | |
| 52 | |
| 53 **Example** | |
| 54 | |
| 55 With List delimiter '; ' and split on columns c3 and c4 | |
| 56 | |
| 57 the input line: | |
| 58 | |
| 59 :: | |
| 60 | |
| 61 1 1.3 id1; id2 desc1; desc2 AMDLID | |
| 62 | |
| 63 will be output as 2 lines: | |
| 64 | |
| 65 :: | |
| 66 | |
| 67 1 1.3 id1 desc1 AMDLID | |
| 68 1 1.3 id2 desc2 AMDLID | |
| 69 | |
| 70 ]]></help> | |
| 71 </tool> |
