comparison SetCharges.xml @ 0:ec91516cc95f draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit e28ca123295d50b85ba872e5a4720fd72697ecc3
author metexplore
date Thu, 13 Mar 2025 15:50:48 +0000
parents
children 921a828bd368
comparison
equal deleted inserted replaced
-1:000000000000 0:ec91516cc95f
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <tool id="met4j_SetCharges" name="SetCharges" version="@TOOL_VERSION@">
3 <description>Set charge to metabolites in a SBML file from a tabulated file containing the metabolite ids and the charges</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="bio_tools"/>
8 <expand macro="requirements"/>
9 <command detect_errors="exit_code"><![CDATA[met4j fr.inrae.toulouse.metexplore.met4j_toolbox.attributes.SetCharges#if str($colcharge) != 'nan':
10 -cc "$colcharge"
11 #end if
12 #if str($colid) != 'nan':
13 -ci "$colid"
14 #end if
15 $p
16 $s
17 #if str($nSkip):
18 -n "$nSkip"
19 #end if
20 -i "$sbml"
21 #if str($tab) != 'None':
22 -tab "$tab"
23 #end if
24 #if str($c):
25 -c "$c"
26 #end if
27 -o "$out"
28 ]]></command>
29 <inputs>
30 <param argument="-cc" label="[2] number of the column where are the charges" name="colcharge" optional="true" type="integer" value="2"/>
31 <param argument="-ci" label="[1] number of the column where are the metabolite ids" name="colid" optional="true" type="integer" value="1"/>
32 <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"/>
33 <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"/>
34 <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">
35 <sanitizer invalid_char="_">
36 <valid initial="string.printable"/>
37 </sanitizer>
38 </param>
39 <param argument="-i" format="sbml" label="Original SBML file" name="sbml" optional="false" type="data" value=""/>
40 <param argument="-tab" format="tsv" label="Input Tabulated file" name="tab" optional="true" type="data" value=""/>
41 <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="#">
42 <sanitizer invalid_char="_">
43 <valid initial="string.printable"/>
44 </sanitizer>
45 </param>
46 </inputs>
47 <outputs>
48 <data format="sbml" name="out"/>
49 </outputs>
50 <tests>
51 <test>
52 <param name="sbml" value="toy_model.xml"/>
53 <param name="tab" value="charges.tsv"/>
54 <output ftype="sbml" name="out">
55 <assert_contents>
56 <is_valid_xml/>
57 <has_line_matching expression=".*fbc:charge=.2.*" n="1"/>
58 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
59 </assert_contents>
60 </output>
61 </test>
62 <test>
63 <param name="sbml" value="toy_model.xml"/>
64 <param name="tab" value="chargesWithComment.tsv"/>
65 <output ftype="sbml" name="out">
66 <assert_contents>
67 <is_valid_xml/>
68 <has_line_matching expression=".*fbc:charge=.2.*" n="1" negate="true"/>
69 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
70 </assert_contents>
71 </output>
72 </test>
73 <test>
74 <param name="sbml" value="toy_model.xml"/>
75 <param name="tab" value="charges.tsv"/>
76 <param name="nSkip" value="1"/>
77 <output ftype="sbml" name="out">
78 <assert_contents>
79 <is_valid_xml/>
80 <has_line_matching expression=".*fbc:charge=.2.*" n="1" negate="true"/>
81 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
82 </assert_contents>
83 </output>
84 </test>
85 <test>
86 <param name="sbml" value="toy_model.xml"/>
87 <param name="tab" value="charges.tsv"/>
88 <param name="ci" value="2"/>
89 <param name="cc" value="3"/>
90 <output ftype="sbml" name="out">
91 <assert_contents>
92 <is_valid_xml/>
93 <has_line_matching expression=".*fbc:charge=.2.*" n="1"/>
94 <has_line_matching expression=".*fbc:charge=.-3.*" n="1"/>
95 </assert_contents>
96 </output>
97 </test>
98 <test>
99 <param name="sbml" value="XF_network.sbml"/>
100 <param name="tab" value="chargesXF.tsv"/>
101 <param name="p" value="true"/>
102 <param name="s" value="true"/>
103 <output ftype="sbml" name="out">
104 <assert_contents>
105 <is_valid_xml/>
106 <has_line_matching expression=".*fbc:charge=.-1000.*" n="3"/>
107 </assert_contents>
108 </output>
109 </test>
110 </tests>
111 <help><![CDATA[Set charge to metabolites in a SBML file from a tabulated file containing the metabolite ids and the charges
112 The charge must be a number. The ids must correspond between the tabulated file and the SBML file.
113 If prefix or suffix is different in the SBML file, use the -p or the -s options.
114 The charge will be written in the SBML file in two locations:+
115 - in the reaction notes (e.g. charge: -1)
116 - as fbc attribute (e.g. fbc:charge="1")
117 @ATTRIBUTION@]]></help>
118 <citations>
119 <citation type="doi">10.1515/jib-2017-0082</citation>
120 </citations>
121 </tool>