Mercurial > repos > iuc > join_files_by_id
comparison join_files_by_id.xml @ 0:d212d12aee5e draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/join_files_by_id commit a835a0b20127f485a6af4b466bb29d58d63541ea
author | iuc |
---|---|
date | Wed, 09 Aug 2017 17:44:54 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d212d12aee5e |
---|---|
1 <tool id="join_files_by_id" name="Join datasets by identifier column" version="1.0"> | |
2 <requirements> | |
3 <requirement type="package" version="1.10.4">r-data.table</requirement> | |
4 </requirements> | |
5 <command detect_errors="exit_code"><![CDATA[ | |
6 Rscript '$__tool_directory__/join_files.R' | |
7 --out='$out_file1' | |
8 --he='$header' | |
9 --jc='$field' | |
10 --sep='$delimiter' | |
11 --nc='$null_str' | |
12 --in='$input1' | |
13 #for $q in $queries | |
14 --in='${q.input}' | |
15 #end for | |
16 ]]></command> | |
17 <inputs> | |
18 <param name="header" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Header" help="If header is true, the column name used for joining need to be the same in all datasets"/> | |
19 <param name="delimiter" type="select" label="Delimited by"> | |
20 <option value="ta">Tab</option> | |
21 <option value="do">Dot</option> | |
22 <option value="co">Comma</option> | |
23 <option value="un">Underscore</option> | |
24 <option value="da">Dash</option> | |
25 <option value="sp">Space</option> | |
26 </param> | |
27 <param name="null_str" type="select" label="Select mismatch character"> | |
28 <option value="0">0</option> | |
29 <option value="-">-</option> | |
30 <option value="">"empty"</option> | |
31 <option value="NA">NA</option> | |
32 </param> | |
33 <param name="input1" type="data" format="tabular" label="Select table" help="Single dataset selection only to preserve the order"/> | |
34 <repeat name="queries" min="1" title="Select table"> | |
35 <param name="input" type="data" format="tabular" label="Select table" help="Single dataset selection only to preserve the order"/> | |
36 </repeat> | |
37 <param name="field" type="data_column" data_ref="input1" label="Column used for joining" /> | |
38 </inputs> | |
39 <outputs> | |
40 <data name="out_file1" format="tabular" /> | |
41 </outputs> | |
42 <tests> | |
43 <test> | |
44 <param name="header" value="1"/> | |
45 <param name="null_str" value="0"/> | |
46 <param name="delimiter" value="ta"/> | |
47 <param name="input1" value="df1.txt"/> | |
48 <repeat name="queries"> | |
49 <param name="input" value="df2.txt"/> | |
50 </repeat> | |
51 <repeat name="queries"> | |
52 <param name="input" value="df3.txt"/> | |
53 </repeat> | |
54 <param name="field" value="1"/> | |
55 <output name="out_file1" file="df.txt"/> | |
56 </test> | |
57 </tests> | |
58 <help><![CDATA[ | |
59 **What it does** | |
60 | |
61 Joins datasets by identifier column | |
62 | |
63 ----- | |
64 | |
65 '''Example''' | |
66 | |
67 Dataset 1: | |
68 | |
69 +--------+--------+---------+ | |
70 | name | counts | percent | | |
71 +========+========+=========+ | |
72 | gene 1 | 10 | 0.3 | | |
73 +--------+--------+---------+ | |
74 | gene 2 | 20 | 0.2 | | |
75 +--------+--------+---------+ | |
76 | gene 3 | 20 | 0.2 | | |
77 +--------+--------+---------+ | |
78 | |
79 | |
80 and Dataset 2: | |
81 | |
82 +--------+--------+---------+ | |
83 | name | counts | percent | | |
84 +========+========+=========+ | |
85 | gene 1 | 13 | 0.5 | | |
86 +--------+--------+---------+ | |
87 | gene 4 | 4 | 0.4 | | |
88 +--------+--------+---------+ | |
89 | |
90 | |
91 and Dataset 3: | |
92 | |
93 +--------+--------+---------+ | |
94 | name | counts | percent | | |
95 +========+========+=========+ | |
96 | gene 1 | 10 | 0.3 | | |
97 +--------+--------+---------+ | |
98 | gene 3 | 12 | 0.2 | | |
99 +--------+--------+---------+ | |
100 | gene 4 | 4 | 0.4 | | |
101 +--------+--------+---------+ | |
102 | gene 5 | 19 | 0.6 | | |
103 +--------+--------+---------+ | |
104 | |
105 | |
106 will result in the following: | |
107 | |
108 +--------+--------+---------+--------+---------+--------+---------+ | |
109 | name | counts | percent | counts | percent | counts | percent | | |
110 +========+========+=========+========+=========+========+=========+ | |
111 | gene 1 | 10 | 0.3 | 13 | 0.5 | 10 | 0.3 | | |
112 +--------+--------+---------+--------+---------+--------+---------+ | |
113 | gene 2 | 20 | 0.2 | 0 | 0 | 0 | 0 | | |
114 +--------+--------+---------+--------+---------+--------+---------+ | |
115 | gene 3 | 12 | 0.2 | 0 | 0 | 12 | 0.2 | | |
116 +--------+--------+---------+--------+---------+--------+---------+ | |
117 | gene 4 | 0 | 0 | 4 | 0.4 | 4 | 0.4 | | |
118 +--------+--------+---------+--------+---------+--------+---------+ | |
119 | gene 5 | 0 | 0 | 0 | 0 | 19 | 0.6 | | |
120 +--------+--------+---------+--------+---------+--------+---------+ | |
121 | |
122 For help contact: jochen.bick@usys.ethz.ch | |
123 ]]></help> | |
124 </tool> |