Mercurial > repos > jpayne > table_ops
comparison table-union.xml @ 14:1af2524f48b7 tip
planemo upload
author | jpayne |
---|---|
date | Tue, 30 Oct 2018 16:18:02 -0400 |
parents | 15230438f7f5 |
children |
comparison
equal
deleted
inserted
replaced
13:746091a78780 | 14:1af2524f48b7 |
---|---|
2 <description>by combining their rows and unionizing columns</description> | 2 <description>by combining their rows and unionizing columns</description> |
3 <requirements> | 3 <requirements> |
4 <!-- <requirement type="package" version="3.4">python</requirement> --> | 4 <!-- <requirement type="package" version="3.4">python</requirement> --> |
5 </requirements> | 5 </requirements> |
6 <command detect_errors="exit_code"><![CDATA[ | 6 <command detect_errors="exit_code"><![CDATA[ |
7 python $__tool_directory__/table-union.py | 7 #if $input_type.source_select == 'two' |
8 #set tables=($table_1, $table_2) | |
9 #else | |
10 #set tables=$input_type.tables | |
11 #end if | |
12 python $__tool_directory__/table-union.py "$union" | |
8 #for $table in $tables | 13 #for $table in $tables |
9 $table | 14 $table |
10 #end for | 15 #end for |
11 > $combined_table | 16 > $combined_table |
12 ]]></command> | 17 ]]></command> |
13 <inputs> | 18 <inputs> |
14 <param name="tables" type="data_collection" format="tsv" collection_type="list" /> | 19 <param name="union" type="boolean" label="Attempt to unionize on an autodetected key column" checked="false" falsevalue="" /> |
20 <conditional name="input_type"> | |
21 <param name="source_select" type="select" label="Mode"> | |
22 <option value="two">Combine two tables</option> | |
23 <option value="collection">Combine a collection of tables</option> | |
24 </param> | |
25 <when value="collection"> | |
26 <param name="tables" type="data_collection" format="tabular,tsv" collection_type="list" /> | |
27 </when> | |
28 <when value="two"> | |
29 <param name="table_1" type="data" format="tabular,tsv" /> | |
30 <param name="table_2" type="data" format="tabular,tsv" /> | |
31 </when> | |
32 </conditional> | |
15 </inputs> | 33 </inputs> |
16 <outputs> | 34 <outputs> |
17 <data name="combined_table" format="tsv" label="Combined table" /> | 35 <data name="combined_table" format="tsv" label="Combined table" /> |
18 </outputs> | 36 </outputs> |
19 | 37 |
20 <tests> | 38 <tests> |
21 <test> | 39 <test> |
40 <param name="source_select" value="collection" /> | |
41 <param name="union" value="true" /> | |
22 <param name="tables"> | 42 <param name="tables"> |
23 <collection type="list"> | 43 <collection type="list"> |
24 <element name="1" value="dingbat.tsv" /> | 44 <element name="1" value="dingbat.tsv" /> |
25 <element name="2" value="loki.tsv" /> | 45 <element name="2" value="loki.tsv" /> |
26 </collection> | 46 </collection> |
27 </param> | 47 </param> |
28 <output name="combined_table" value="combined.tsv" /> | 48 <output name="combined_table" value="combined.tsv" /> |
49 </test> | |
50 <test> | |
51 <param name="source_select" value="two" /> | |
52 <param name="union" value="false" /> | |
53 <param name="table_1" value="dingbat.tsv" /> | |
54 <param name="table_2" value="loki.tsv" /> | |
55 <output name="combined_table" value="no_union.tsv" /> | |
29 </test> | 56 </test> |
30 </tests> | 57 </tests> |
31 <help><![CDATA[ | 58 <help><![CDATA[ |
32 Concatenate a collection of TSV files wile preserving and unionizing headers. | 59 Concatenate a collection of TSV files wile preserving and unionizing headers. |
33 ]]></help> | 60 ]]></help> |