comparison tools/attributes/SetCharges/SetCharges.xml @ 9:0976a6257300 draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 05db35f63cadb9d56dafff594a3507c59cd85273
author metexplore
date Fri, 31 Jan 2025 18:28:53 +0000
parents
children 6a112eaf8f38
comparison
equal deleted inserted replaced
8:1274e2a62479 9:0976a6257300
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <tool id="met4j_SetCharges" name="SetCharges" version="develop">
3 <description>Set charge to metabolites in a SBML file from a tabulated file containing the metabolite ids and the charges</description>
4 <xrefs>
5 <xref type="bio.tools">met4j</xref>
6 </xrefs>
7 <requirements>
8 <container type="singularity">oras://registry.forgemia.inra.fr/metexplore/met4j/met4j-singularity:develop</container>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[sh /usr/bin/met4j.sh attributes.SetCharges#if str($colcharge) != 'nan':
11 -cc "$colcharge"
12 #end if
13 #if str($colid) != 'nan':
14 -ci "$colid"
15 #end if
16 $p
17 $s
18 #if str($nSkip):
19 -n "$nSkip"
20 #end if
21 -i "$sbml"
22 #if str($tab) != 'None':
23 -tab "$tab"
24 #end if
25 #if str($c):
26 -c "$c"
27 #end if
28 -o "$out"
29 ]]></command>
30 <inputs>
31 <param argument="-cc" label="[2] number of the column where are the charges" name="colcharge" optional="true" type="integer" value="2"/>
32 <param argument="-ci" label="[1] number of the column where are the metabolite ids" name="colid" optional="true" type="integer" value="1"/>
33 <param argument="-p" checked="false" falsevalue="" label="[deactivated] To match the objects in the sbml file, adds the prefix M_ to metabolite ids" name="p" truevalue="-p" type="boolean" value="false"/>
34 <param argument="-s" checked="false" falsevalue="" label="[deactivated] To match the objects in the sbml file, adds the suffix _comparmentID to metabolites" name="s" truevalue="-s" type="boolean" value="false"/>
35 <param argument="-n" label="[0] Number of lines to skip at the beginning of the tabulated file" name="nSkip" optional="true" type="text" value="0">
36 <sanitizer invalid_char="_">
37 <valid initial="string.printable"/>
38 </sanitizer>
39 </param>
40 <param argument="-i" format="sbml" label="Original SBML file" name="sbml" optional="false" type="data" value=""/>
41 <param argument="-tab" format="tsv" label="Input Tabulated file" name="tab" optional="true" type="data" value=""/>
42 <param argument="-c" label="[#] Comment String in the tabulated file. The lines beginning by this string won't be read" name="c" optional="true" type="text" value="#">
43 <sanitizer invalid_char="_">
44 <valid initial="string.printable"/>
45 </sanitizer>
46 </param>
47 </inputs>
48 <outputs>
49 <data format="sbml" name="out"/>
50 </outputs>
51 <tests>
52 <test>
53
54
55
56
57
58
59 <param name="sbml" value="toy_model.xml"/>
60
61
62
63
64
65
66 <param name="tab" value="charges.tsv"/>
67
68
69
70
71
72
73 <output ftype="sbml" name="out">
74
75
76
77
78
79
80 <assert_contents>
81
82
83
84
85
86
87 <is_valid_xml/>
88
89
90
91
92
93
94 <has_line_matching expression=".*fbc:charge=.2.*" n="1"/>
95
96
97
98
99
100
101 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
102
103
104
105
106
107
108 </assert_contents>
109
110
111
112
113
114
115 </output>
116
117
118
119
120
121
122 </test>
123 <test>
124
125
126
127
128
129
130 <param name="sbml" value="toy_model.xml"/>
131
132
133
134
135
136
137 <param name="tab" value="chargesWithComment.tsv"/>
138
139
140
141
142
143
144 <output ftype="sbml" name="out">
145
146
147
148
149
150
151 <assert_contents>
152
153
154
155
156
157
158 <is_valid_xml/>
159
160
161
162
163
164
165 <has_line_matching expression=".*fbc:charge=.2.*" n="1" negate="true"/>
166
167
168
169
170
171
172 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
173
174
175
176
177
178
179 </assert_contents>
180
181
182
183
184
185
186 </output>
187
188
189
190
191
192
193 </test>
194 <test>
195
196
197
198
199
200
201 <param name="sbml" value="toy_model.xml"/>
202
203
204
205
206
207
208 <param name="tab" value="charges.tsv"/>
209
210
211
212
213
214
215 <param name="nSkip" value="1"/>
216
217
218
219
220
221
222 <output ftype="sbml" name="out">
223
224
225
226
227
228
229 <assert_contents>
230
231
232
233
234
235
236 <is_valid_xml/>
237
238
239
240
241
242
243 <has_line_matching expression=".*fbc:charge=.2.*" n="1" negate="true"/>
244
245
246
247
248
249
250 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
251
252
253
254
255
256
257 </assert_contents>
258
259
260
261
262
263
264 </output>
265
266
267
268
269
270
271 </test>
272 <test>
273
274
275
276
277
278
279 <param name="sbml" value="toy_model.xml"/>
280
281
282
283
284
285
286 <param name="tab" value="charges.tsv"/>
287
288
289
290
291
292
293 <param name="ci" value="2"/>
294
295
296
297
298
299
300 <param name="cc" value="3"/>
301
302
303
304
305
306
307 <output ftype="sbml" name="out">
308
309
310
311
312
313
314 <assert_contents>
315
316
317
318
319
320
321 <is_valid_xml/>
322
323
324
325
326
327
328 <has_line_matching expression=".*fbc:charge=.2.*" n="1"/>
329
330
331
332
333
334
335 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
336
337
338
339
340
341
342 </assert_contents>
343
344
345
346
347
348
349 </output>
350
351
352
353
354
355
356 </test>
357 <test>
358
359
360
361
362
363
364 <param name="sbml" value="XF_network.sbml"/>
365
366
367
368
369
370
371 <param name="tab" value="chargesXF.tsv"/>
372
373
374
375
376
377
378 <param name="p" value="true"/>
379
380
381
382
383
384
385 <param name="s" value="true"/>
386
387
388
389
390
391
392 <output ftype="sbml" name="out">
393
394
395
396
397
398
399 <assert_contents>
400
401
402
403
404
405
406 <is_valid_xml/>
407
408
409
410
411
412
413 <has_line_matching expression=".*fbc:charge=.-1000.*" n="3"/>
414
415
416
417
418
419
420 </assert_contents>
421
422
423
424
425
426
427 </output>
428
429
430
431
432
433
434 </test>
435 </tests>
436 <help><![CDATA[Set charge to metabolites in a SBML file from a tabulated file containing the metabolite ids and the charges
437 The charge must be a number. The ids must correspond between the tabulated file and the SBML file.
438 If prefix or suffix is different in the SBML file, use the -p or the -s options.
439 The charge will be written in the SBML file in two locations:+
440 - in the reaction notes (e.g. charge: -1)
441 - as fbc attribute (e.g. fbc:charge="1")]]></help>
442 <citations>
443 <citation type="doi">10.1515/jib-2017-0082</citation>
444 </citations>
445 </tool>