comparison concat.xml @ 0:c577f13705f2 draft default tip

planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics commit eba1150dad55ad9eca5e93358d9f75e6b6dba2ec
author workflow4metabolomics
date Wed, 10 Jul 2024 15:20:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c577f13705f2
1 <tool id="W4Mconcatenate" name="W4M concatenate" version="1.0.0+galaxy0">
2 <description>to merge two metadata tables</description>
3 <requirements>
4 <requirement type="package" version="4.3.3">r-base</requirement>
5 <requirement type="package" version="1.1.4">r-dplyr</requirement>
6 <requirement type="package" version="1.0.0">r-w4mrutils</requirement>
7 </requirements>
8 <command detect_errors="exit_code">
9 <![CDATA[
10
11 Rscript '$__tool_directory__/concatenation_wrapper.R'
12
13 dataMatrix_1 '$dataMatrix_1'
14
15 dataMatrix_2 '$dataMatrix_2'
16
17 metadata_1 '$metadata_1'
18
19 metadata_2 '$metadata_2'
20
21 type '$type'
22
23 tab1 '$tab1'
24
25 tab2 '$tab2'
26
27 concatenation '$concatenation'
28
29 choice_keep '$choice.choice_keep'
30 #if str($choice.choice_keep) == 'yes':
31 keep 0
32 #end if
33 #if str($choice.choice_keep) == 'no':
34 keep "$choice.keep"
35 #end if
36
37 dataMatrix_1_out '$dataMatrix_1_out'
38 dataMatrix_2_out '$dataMatrix_2_out'
39 metadata_out '$metadata_out'
40
41 ]]></command>
42
43
44 <inputs>
45
46 <param name="dataMatrix_1" type="data" label="Data matrix file 1" format="tabular"/>
47 <param name="dataMatrix_2" type="data" label="Data matrix file 2" format="tabular"/>
48 <param name="metadata_1" type="data" label="Metadata file 1" format="tabular"/>
49 <param name="metadata_2" type="data" label="Metadata file 2" format="tabular"/>
50
51 <param name="type" type="select" display="radio" label="Type of metadata">
52 <option value="sample">Sample metadata</option>
53 <option value="variable">Variable metadata</option>
54 </param>
55
56 <param name="concatenation" type="select" display="radio" label="Type of concatenation">
57 <option value="unique">Unique</option>
58 <option value="intersection">Intersection</option>
59 <option value="union">Union</option>
60 </param>
61
62 <conditional name="choice">
63 <param name="choice_keep" type="select" display="radio" label="Keep all or just one">
64 <option value="yes">Keep all</option>
65 <option value="no">Keep one</option>
66 </param>
67 <when value="no">
68 <param name="keep" type="select" display="radio" label="Which Metadata to keep">
69 <option value="1">Metadata 1</option>
70 <option value="2">Metadata 2</option>
71 </param>
72 </when>
73 <when value="yes">
74 </when>
75 </conditional>
76
77 <param name="tab1" type="text" label="Suffix for Metadata 1" value="Tab1"/>
78 <param name="tab2" type="text" label="Suffix for Metadata 2" value="Tab2"/>
79
80 </inputs>
81
82
83
84 <outputs>
85
86 <data name="dataMatrix_1_out" label="Concat_${dataMatrix_1.name}" format="tabular"></data>
87 <data name="dataMatrix_2_out" label="Concat_${dataMatrix_2.name}" format="tabular"></data>
88 <data name="metadata_out" label="Concat_${metadata_1.name}" format="tabular"></data>
89
90 </outputs>
91
92 <tests>
93 <test>
94 <param name="dataMatrix_1" value="Input_Unique_Test_1-2-3-4-5_DM1.txt"/>
95 <param name="dataMatrix_2" value="Input_Unique_Test_1-2-3_DM2.txt"/>
96 <param name="metadata_1" value="Input_Unique_Test_1_SM1.txt"/>
97 <param name="metadata_2" value="Input_Unique_Test_1_SM2.txt"/>
98 <param name="concatenation" value="unique"/>
99 <param name="choice_keep" value="yes"/>
100 <param name="tab1" value="tab1"/>
101 <param name="tab2" value="tab2"/>
102
103 <output name="dataMatrix_1_out" file="Output_Attendu_Unique_Test_1-2-3_DM1.txt"/>
104 <output name="dataMatrix_2_out" file="Output_Attendu_Unique_Test_1-2-3_DM2.txt"/>
105 <output name="metadata_out" file="Output_Attendu_Unique_Test_1_Metadata.txt"/>
106
107
108 </test>
109
110 <test expect_failure="true">
111 <param name="dataMatrix_1" value="Input_Unique_Test_1-2-3-4-5_DM1.txt"/>
112 <param name="dataMatrix_2" value="Input_Unique_Test_4_DM2.txt"/>
113 <param name="metadata_1" value="Input_Unique_Test_4_SM1.txt"/>
114 <param name="metadata_2" value="Input_Unique_Test_4_SM2.txt"/>
115 <param name="concatenation" value="unique"/>
116 <param name="choice_keep" value="yes"/>
117 <param name="tab1" value="tab1"/>
118 <param name="tab2" value="tab2"/>
119
120 </test>
121
122 </tests>
123
124 <help><![CDATA[
125
126 .. class:: infomark
127
128 **Credits**
129 | **Original tool code:** Hanane Nourine
130 | **Original tool wrapping:** Hanane Nourine
131 | **Tool maintainer:** Melanie Petera (PFEM - INRAE - MetaboHUB)
132 | **Wrapper maintainer:** Melanie Petera (PFEM - INRAE - MetaboHUB)
133
134 .. class:: infomark
135
136 **Contact:** Melanie Petera (PFEM - INRAE - MetaboHUB)
137
138 ---------------------------------------------------
139
140 ******************
141 Concatenation
142 ******************
143
144 ===========
145 DESCRIPTION
146 ===========
147
148 Concatenate two Metadata tables
149
150
151 ---------------------------------------------------
152
153 ==========================
154 ALIGNMENT WITH OTHER TOOLS
155 ==========================
156
157 This tool is designed to work with the W4M 3-tables format. Inputs are supposed to follow this standard.
158 Outputs follows the standard and thus can be used in further W4M-supported workflows.
159
160 -----------
161 Input files
162 -----------
163
164 +----------------------------------+------------+
165 | Parameter : num + label | Format |
166 +==================================+============+
167 | 1 : First Data matrix file | tabular |
168 +----------------------------------+------------+
169 | 2 : First metadata file | tabular |
170 +----------------------------------+------------+
171 | 3 : Second Data matrix file | tabular |
172 +----------------------------------+------------+
173 | 4 : Second metadata file | tabular |
174 +----------------------------------+------------+
175
176 ------------
177 Output files
178 ------------
179
180 +----------------------------------+------------+
181 | Parameter : num + label | Format |
182 +==================================+============+
183 | 1 : Metadata concatenate file | tabular |
184 +----------------------------------+------------+
185 | 2 : First Data matrix file | tabular |
186 +----------------------------------+------------+
187 | 3 : Second Data matrix file | tabular |
188 +----------------------------------+------------+
189
190 ---------------------------------------------------
191
192
193 ===============
194 TOOL PARAMETERS
195 ===============
196
197
198 Data matrix
199 | contains the intensity values of the analytical variables.
200 | First line is the sample identifiers and first column the variable identifiers.
201 |
202
203
204 Metadata file
205 | contains metadata about samples OR variables (only one type possible at a time).
206 | Each metadata file must match its corresponding data matrix file regarding identifiers.
207 |
208
209 Type of metadata
210 | Specify which type of metadata table is given as metadata file
211 |
212
213
214 Type of concatenation
215 | Selects the type of concatenation
216 | Unique: identifiers are the same in both datasets (i.e. metadata file 1 and metadata file 2 are expected to match perfectly regarding identifiers)
217 | Intersection: keep only identifiers in common
218 | Union: keep all identifiers in both datasets
219 |
220
221 Choice_keep
222 | Determine what to do in case a column name is found in the two metadata files
223 | - Keep all: both columns and change their names by adding a prefix
224 | - Keep one: the column belonging to metadata 1 or metadata 2
225 |
226
227 Prefixes for redundant columns
228 | By default, the prefixes are Tab1 and Tab2
229 |
230
231 ==================
232 OUTPUT DESCRIPTION
233 ==================
234
235 **Unique**: the tables must have the same identifiers, otherwise a warning will be generated.
236 The output returned is a unique merged metadata file without modifying the DataMatrices.
237
238 **Intersection**: there must be identifiers in common between the two metadata tables, otherwise an error will be displayed.
239 Moreover, if the number of identifiers in common is less than 5, a warning will be generated.
240 The DataMatrix outputs will only keep common identifiers.
241
242 **Union**: the identifiers don't necessarily have to be the same between the metadata tables. If no identifiers are common, a warning will be generated.
243 The modified DataMatrix will then include all the individuals, adding NA values for those that are missing.
244 If common pairs of sample and variable exist between the dataset 1 and dataset 2 with no difference in the intensity values,
245 the intersections will be added instead of NA.
246
247
248
249 ]]></help>
250 <citations>
251 <citation type="doi">10.1093/bioinformatics/btu813</citation>
252 </citations>
253
254 <creator>
255 <organization name="PFEM" url="https://eng-pfem.isc.inrae.fr/"></organization>
256 <organization name="Workflow4metabolomics" url="https://workflow4metabolomics.org/"></organization>
257
258 <person givenName="Hanane" familyName="Nourine" jobTitle="Intern"></person>
259 <person givenName="Mélanie" familyName="Petera"></person>
260 </creator>
261 </tool>