comparison tools/convert/Tab2Sbml/Tab2Sbml.xml @ 0:dcd16521b969 draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit 5dab0a2d83a1fdd7a1878a50ba0f24e752505393
author metexplore
date Fri, 10 Jun 2022 10:31:34 +0000
parents
children 9b162ee6ff8e
comparison
equal deleted inserted replaced
-1:000000000000 0:dcd16521b969
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tool id="met4j_Tab2Sbml" name="Tab2Sbml" version="0.11.0">
3 <description>Create a Sbml File from a tabulated file that contains the reaction ids and the formulas</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:0.11.0</container>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[sh /usr/bin/met4j.sh convert.Tab2Sbml#if str($colid) != 'nan':
11 -ci "$colid"
12 #end if
13 #if str($colformula) != 'nan':
14 -cf "$colformula"
15 #end if
16 $rp
17 $mp
18 #if str($e):
19 -e "$e"
20 #end if
21 #if str($i):
22 -i "$i"
23 #end if
24 #if str($r):
25 -r "$r"
26 #end if
27 #if str($in) != 'None':
28 -in "$in"
29 #end if
30 #if str($id):
31 -id "$id"
32 #end if
33 $createCompartment
34 #if str($defaultCompartment):
35 -dcpt "$defaultCompartment"
36 #end if
37 #if str($nSkip) != 'nan':
38 -n "$nSkip"
39 #end if
40 -sbml "$sbml"
41 ]]></command>
42 <inputs>
43 <param argument="-ci" label="[1] number of the column where are the reaction ids" name="colid" optional="true" type="integer" value="1"/>
44 <param argument="-cf" label="[2] number of the column where are the reaction formulas" name="colformula" optional="true" type="integer" value="2"/>
45 <param argument="-rp" checked="false" falsevalue="" label="[deactivated] format the reaction ids in a Palsson way (R_***)" name="rp" truevalue="-rp" type="boolean" value="false"/>
46 <param argument="-mp" checked="false" falsevalue="" label="[deactivated] format the metabolite ids in a Palsson way (M_***_c)" name="mp" truevalue="-mp" type="boolean" value="false"/>
47 <param argument="-e" label="[_b] flag to assign metabolite as external" name="e" optional="true" type="text" value="_b">
48 <sanitizer invalid_char="_">
49 <valid initial="string.printable"/>
50 </sanitizer>
51 </param>
52 <param argument="-i" label="[--&gt;] String for irreversible reaction" name="i" optional="true" type="text" value="--&gt;">
53 <sanitizer invalid_char="_">
54 <valid initial="string.printable"/>
55 </sanitizer>
56 </param>
57 <param argument="-r" label="[&lt;==&gt;] String for reversible reaction" name="r" optional="true" type="text" value="&lt;==&gt;">
58 <sanitizer invalid_char="_">
59 <valid initial="string.printable"/>
60 </sanitizer>
61 </param>
62 <param argument="-in" format="tsv" label="Tabulated file" name="in" optional="true" type="data" value=""/>
63 <param argument="-id" label="[NA] Model id written in the SBML file" name="id" optional="true" type="text" value="NA">
64 <sanitizer invalid_char="_">
65 <valid initial="string.printable"/>
66 </sanitizer>
67 </param>
68 <param argument="-cpt" checked="false" falsevalue="" label="[deactivated] Create compartment from metabolite suffixes. If this option is deactivated, only one compartment (the default compartment) will be created" name="createCompartment" truevalue="-cpt" type="boolean" value="false"/>
69 <param argument="-dcpt" label="[c] Default compartment" name="defaultCompartment" optional="true" type="text" value="c">
70 <sanitizer invalid_char="_">
71 <valid initial="string.printable"/>
72 </sanitizer>
73 </param>
74 <param argument="-n" label="[0] Number of lines to skip at the beginning of the tabulated file" name="nSkip" optional="true" type="integer" value="0"/>
75 </inputs>
76 <outputs>
77 <data format="sbml" name="sbml"/>
78 </outputs>
79 <tests>
80 <test>
81 <param name="in" value="toy_model.tsv"/>
82 <output ftype="sbml" name="sbml">
83 <assert_contents>
84 <is_valid_xml/>
85 <has_line_matching expression=".*reaction .*" n="7"/>
86 <has_line_matching expression=".*species .*" n="8"/>
87 </assert_contents>
88 </output>
89 </test>
90 <test>
91 <param name="in" value="toy_model_otherColumns.tsv"/>
92 <param name="colid" value="2"/>
93 <param name="colformula" value="3"/>
94 <output ftype="sbml" name="sbml">
95 <assert_contents>
96 <is_valid_xml/>
97 <has_line_matching expression=".*reaction .*" n="7"/>
98 <has_line_matching expression=".*species .*" n="8"/>
99 </assert_contents>
100 </output>
101 </test>
102 <test>
103 <param name="in" value="toy_model_otherSigns.tsv"/>
104 <param name="i" value="-&gt;"/>
105 <param name="r" value="="/>
106 <output ftype="sbml" name="sbml">
107 <assert_contents>
108 <is_valid_xml/>
109 <has_line_matching expression=".*reaction .*" n="7"/>
110 <has_line_matching expression=".*species .*" n="8"/>
111 </assert_contents>
112 </output>
113 </test>
114 <test>
115 <param name="in" value="toy_model.tsv"/>
116 <param name="rp" value="true"/>
117 <param name="mp" value="true"/>
118 <param name="e" value="_e"/>
119 <param name="createCompartment" value="true"/>
120 <output ftype="sbml" name="sbml">
121 <assert_contents>
122 <is_valid_xml/>
123 <has_line_matching expression=".*boundaryCondition=.true.*" n="3"/>
124 <has_line_matching expression=".*id=.M_A_ext_e.*" n="1"/>
125 <has_line_matching expression=".*id=.R_reac2.*" n="1"/>
126 </assert_contents>
127 </output>
128 </test>
129 <test>
130 <param name="in" value="toy_model.tsv"/>
131 <param name="id" value="myModel"/>
132 <output ftype="sbml" name="sbml">
133 <assert_contents>
134 <is_valid_xml/>
135 <has_line_matching expression=".*myModel.*" n="1"/>
136 </assert_contents>
137 </output>
138 </test>
139 </tests>
140 <help><![CDATA[Create a Sbml File from a tabulated file that contains the reaction ids and the formulas]]></help>
141 </tool>