comparison build/tools/Tab2Sbml/Tab2Sbml.xml @ 6:7a6f2380fc1d draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy
author metexplore
date Wed, 17 May 2023 13:26:37 +0000
parents
children 1436e9cde9c9
comparison
equal deleted inserted replaced
5:35c9abcd8934 6:7a6f2380fc1d
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tool id="met4j_Tab2Sbml" name="Tab2Sbml" version="1.3.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:1.3.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 -in "$in"
28 #if str($id):
29 -id "$id"
30 #end if
31 $createCompartment
32 #if str($defaultCompartment):
33 -dcpt "$defaultCompartment"
34 #end if
35 #if str($nSkip) != 'nan':
36 -n "$nSkip"
37 #end if
38 -sbml "$sbml"
39 ]]></command>
40 <inputs>
41 <param argument="-ci" label="[1] number of the column where are the reaction ids" name="colid" optional="true" type="integer" value="1"/>
42 <param argument="-cf" label="[2] number of the column where are the reaction formulas" name="colformula" optional="true" type="integer" value="2"/>
43 <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"/>
44 <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"/>
45 <param argument="-e" label="[_b] flag to assign metabolite as external" name="e" optional="true" type="text" value="_b">
46 <sanitizer invalid_char="_">
47 <valid initial="string.printable"/>
48 </sanitizer>
49 </param>
50 <param argument="-i" label="[--&gt;] String for irreversible reaction" name="i" optional="true" type="text" value="--&gt;">
51 <sanitizer invalid_char="_">
52 <valid initial="string.printable"/>
53 </sanitizer>
54 </param>
55 <param argument="-r" label="[&lt;==&gt;] String for reversible reaction" name="r" optional="true" type="text" value="&lt;==&gt;">
56 <sanitizer invalid_char="_">
57 <valid initial="string.printable"/>
58 </sanitizer>
59 </param>
60 <param argument="-in" format="tsv" label="Tabulated file" name="in" optional="false" type="data" value=""/>
61 <param argument="-id" label="[NA] Model id written in the SBML file" name="id" optional="true" type="text" value="NA">
62 <sanitizer invalid_char="_">
63 <valid initial="string.printable"/>
64 </sanitizer>
65 </param>
66 <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"/>
67 <param argument="-dcpt" label="[c] Default compartment" name="defaultCompartment" optional="true" type="text" value="c">
68 <sanitizer invalid_char="_">
69 <valid initial="string.printable"/>
70 </sanitizer>
71 </param>
72 <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"/>
73 </inputs>
74 <outputs>
75 <data format="sbml" name="sbml"/>
76 </outputs>
77 <tests>
78 <test>
79 <param name="in" value="toy_model.tsv"/>
80 <output ftype="sbml" name="sbml">
81 <assert_contents>
82 <is_valid_xml/>
83 <has_line_matching expression=".*reaction .*" n="7"/>
84 <has_line_matching expression=".*species .*" n="8"/>
85 </assert_contents>
86 </output>
87 </test>
88 <test>
89 <param name="in" value="toy_model_otherColumns.tsv"/>
90 <param name="colid" value="2"/>
91 <param name="colformula" value="3"/>
92 <output ftype="sbml" name="sbml">
93 <assert_contents>
94 <is_valid_xml/>
95 <has_line_matching expression=".*reaction .*" n="7"/>
96 <has_line_matching expression=".*species .*" n="8"/>
97 </assert_contents>
98 </output>
99 </test>
100 <test>
101 <param name="in" value="toy_model_otherSigns.tsv"/>
102 <param name="i" value="-&gt;"/>
103 <param name="r" value="="/>
104 <output ftype="sbml" name="sbml">
105 <assert_contents>
106 <is_valid_xml/>
107 <has_line_matching expression=".*reaction .*" n="7"/>
108 <has_line_matching expression=".*species .*" n="8"/>
109 </assert_contents>
110 </output>
111 </test>
112 <test>
113 <param name="in" value="toy_model.tsv"/>
114 <param name="rp" value="true"/>
115 <param name="mp" value="true"/>
116 <param name="e" value="_e"/>
117 <param name="createCompartment" value="true"/>
118 <output ftype="sbml" name="sbml">
119 <assert_contents>
120 <is_valid_xml/>
121 <has_line_matching expression=".*boundaryCondition=.true.*" n="3"/>
122 <has_line_matching expression=".*id=.M_A_ext_e.*" n="1"/>
123 <has_line_matching expression=".*id=.R_reac2.*" n="1"/>
124 </assert_contents>
125 </output>
126 </test>
127 <test>
128 <param name="in" value="toy_model.tsv"/>
129 <param name="id" value="myModel"/>
130 <output ftype="sbml" name="sbml">
131 <assert_contents>
132 <is_valid_xml/>
133 <has_line_matching expression=".*myModel.*" n="1"/>
134 </assert_contents>
135 </output>
136 </test>
137 </tests>
138 <help><![CDATA[Create a Sbml File from a tabulated file that contains the reaction ids and the formulas]]></help>
139 <citations/>
140 </tool>