upstream/merge_cols/mergeCols.xml
1<tool id="mergeCols1" name="Merge Columns" version="1.0.3" profile="16.04">
2 <description>together</description>
3 <requirements>
4 <requirement type="package" version="3.7">python</requirement>
5 </requirements>
6 <command><![CDATA[
7python '$__tool_directory__/mergeCols.py'
8"${input1}"
9"${out_file1}"
10"${col1}"
11"${col2}"
12#for $col in $columns
13 ${col.datacol}
14#end for
15 ]]></command>
16 <inputs>
17 <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
18 <param name="col1" label="Merge column" type="data_column" data_ref="input1" />
19 <param name="col2" label="with column" type="data_column" data_ref="input1" help="Need to add more columns? Use controls below."/>
20 <repeat name="columns" title="Columns">
21 <param name="datacol" label="Add column" type="data_column" data_ref="input1" />
22 </repeat>
23 </inputs>
24 <outputs>
25 <data format="tabular" name="out_file1" />
26 </outputs>
27 <tests>
28 <test>
29 <param name="input1" value="1.bed"/>
30 <param name="col1" value="4" />
31 <param name="col2" value="1" />
32 <param name="datacol" value="6" />
33 <output name="out_file1" file="mergeCols.dat"/>
34 </test>
35 </tests>
36<help>
37
38.. class:: infomark
39
40**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
41
42-----
43
44**What it does**
45
46This tool merges columns together. Any number of valid columns can be merged in any order.
47
48-----
49
50**Example**
51
52Input dataset (five columns: c1, c2, c3, c4, and c5)::
53
54 1 10 1000 gene1 chr
55 2 100 1500 gene2 chr
56
57merging columns "**c5,c1**" will return::
58
59 1 10 1000 gene1 chr chr1
60 2 100 1500 gene2 chr chr2
61
62.. class:: warningmark
63
64Note that all original columns are preserved and the result of merge is added as the rightmost column.
65 </help>
66</tool>