-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathinflux_si.xml
204 lines (199 loc) · 13.8 KB
/
influx_si.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<tool id="influx_si" name="influx_si" version="@TOOL_VERSION@+galaxy1" profile="21.09">
<description>
Estimate metabolic fluxes and concentrations by fitting simulated labeling in metabolites to NMR/MS measurements
</description>
<creator>
<person givenName="Serguei" familyName="Sokol" email="[email protected]" url="https://www.toulouse-biotechnology-institute.fr/en/plateformes-plateaux/cellule-mathematiques/" />
<organization name="INRAE" url="https://www.inrae.fr/" />
<organization name="TBI" url="https://www.toulouse-biotechnology-institute.fr/" />
<organization name="Mathematics Cell" url="https://www.toulouse-biotechnology-institute.fr/en/plateformes-plateaux/cellule-mathematiques/" />
<organization name="MetaToul-FluxoMet" url="https://www.toulouse-biotechnology-institute.fr/en/plateformes-plateaux/metatoul/" />
<organization name="MetaboHub2" url="https://www.metabohub.fr/" />
</creator>
<macros>
<import>macros.xml</import>
</macros>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">influx_si</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
#for $inp in $input_main:
unzip $inp;
#end for
ret=0;
influx_$si.s_i
$noopt
$noscale
$fullsys
$emu
$irand
$ln
$sln
$tikhreg
$lim
$ffguess
$nocalc
$addnoise
$TIMEIT
$prof
#if $opt.meth:
--meth='$opt.meth'
#end if
#if $opt.sens:
--sens='$opt.sens'
#end if
#if $opt.cupx:
--cupx='$opt.cupx'
#end if
#if $opt.cupn:
--cupn='$opt.cupn'
#end if
#if $opt.cupp:
--cupp='$opt.cupp'
#end if
#if $opt.clownr:
--clownr='$opt.clownr'
#end if
#if $opt.cinout:
--cinout='$opt.cinout'
#end if
#if $opt.clowp:
--clowp='$opt.clowp'
#end if
#if $opt.np:
--np='$opt.np'
#end if
#if $opt.zc:
--zc='$opt.zc'
#end if
#if $opt.fseries:
--fseries='$opt.fseries'
#end if
#if $opt.iseries:
--iseries='$opt.iseries'
#end if
#if $opt.seed:
--seed='$opt.seed'
#end if
#if $opt.excl_outliers:
--excl_outliers $opt.excl_outliers
#end if
#if $opt.tblimit:
--tblimit='$opt.tblimit'
#end if
#if $si.s_i == 'i' and $si.time_order != 'None':
--time_order='$si.time_order'
#end if
#for $inp in $input_main:
#set base = $inp.name[:-4]
--prefix "$base"
#end for
#if $opt.mtf:
--mtf '$opt.mtf'
#end if
|| ret=\$?;
#for $inp in $input_main:
#set base = $inp.name[:-4]
for f in "$base"_res/*.{err,log}; do mv -f "\$f" "\$f".txt || true; done;
for f in "$base"_res/*.{sim,stat}; do mv -f "\$f" "\$f".tsv || true; done;
for f in "$base"_res/*.pdf; do [ -e "\$f" ] && mv -f "\$f" "\$f".pdf || true; done;
rm -rf "$base"_res/tmp || true;
#end for
exit \$ret;
]]></command>
<inputs>
<param type="data" format="zip" name="input_main" multiple="true" label="At least one MTF collection (.netw, .miso, ...)"/>
<conditional name="si">
<param name="s_i" type="select" label="labeling type" display="radio">
<option value="s">stationary</option>
<option value="i">instationary</option>
</param>
<when value="s"/>
<when value="i">
<param argument="--time_order" type="select" display="radio" label="Time order for ODE solving" help="Order 2 is more precise but more time consuming than order 1. The value '1,2' makes to start solving the ODE with the first order scheme then continues with the order 2.">
<option value="None">From .opt file or Default</option>
<option value="1">1 (Default)</option>
<option value="2">2</option>
<option value="1,2">1,2</option>
</param>
</when>
</conditional>
<section name="opt" title="Advanced Options" expanded="false">
<param argument="--noopt" type="boolean" checked="false" truevalue="--noopt" falsevalue="" label="--noopt" help="no optimization, just use free parameters as is (after a projection on feasibility domain), to calculate dependent fluxes, cumomers, stats and so on" />
<param argument="--noscale" type="boolean" checked="false" truevalue="--noscale" falsevalue="" label="--noscale" help="no scaling factors to optimize => all scaling factors are assumed to be 1" />
<param argument="--fullsys" type="boolean" checked="false" truevalue="--fullsys" falsevalue="" label="--fullsys" help="calculate all cumomer set (not just the reduced one necessary to simulate measurements)" />
<param argument="--emu" type="boolean" checked="false" truevalue="--emu" falsevalue="" label="--emu" help="simulate labeling in EMU approach" />
<param argument="--irand" type="boolean" checked="false" truevalue="--irand" falsevalue="" label="--irand" help="ignore initial approximation for free parameters (free fluxes and metabolite concentrations) from the FTBL file or from a dedicated file (cf --fseries and --iseries option) and use random values drawn uniformly from [0,1] interval" />
<param argument="--ln" type="boolean" checked="false" truevalue="--ln" falsevalue="" label="--ln" help="Least norm solution is used for increments during the non-linear iterations when Jacobian is rank deficient" />
<param argument="--sln" type="boolean" checked="false" truevalue="--sln" falsevalue="" label="--sln" help="Least norm of the solution of linearized problem (and not just of increments) is used when Jacobian is rank deficient" />
<param argument="--tikhreg" type="boolean" checked="false" truevalue="--tikhreg" falsevalue="" label="--tikhreg" help="Approximate least norm solution is used for increments during the non-linear iterations when Jacobian is rank deficient" />
<param argument="--lim" type="boolean" checked="false" truevalue="--lim" falsevalue="" label="--lim" help="The same as --ln but with a function limSolve::lsei()" />
<param argument="--ffguess" type="boolean" checked="false" truevalue="--ffguess" falsevalue="" label="--ffguess" help="Don't use free/dependent flux definitions from FTBL file(s). Make an automatic guess." />
<param argument="--nocalc" type="boolean" checked="false" truevalue="--nocalc" falsevalue="" label="--nocalc" help="generate an R code but not execute it." />
<param argument="--addnoise" type="boolean" checked="false" truevalue="--addnoise" falsevalue="" label="--addnoise" help="Add centered gaussian noise to simulated measurements written to _res.kvh file. SD of this noise is taken from FTBL file" />
<param argument="--TIMEIT" type="boolean" checked="false" truevalue="--TIMEIT" falsevalue="" label="--TIMEIT" help="developer option: measure cpu time or not" />
<param argument="--prof" type="boolean" checked="false" truevalue="--prof" falsevalue="" label="--prof" help="developer option: do time profiling or not" />
<param argument="--meth" type="select" label="--meth" optional="true" help="method for optimization, one of nlsic|BFGS|Nelder-Mead|pso. Default: nlsic">
<option value="BFGS">BFGS</option>
<option value="Nelder-Mead">Nelder-Mead</option>
<option value="nlsic">nlsic</option>
<option value="pso">pso</option>
</param>
<param argument="--sens" type="text" value="" label="--sens" optional="true" help="sensitivity method: SENS can be 'mc[=N]', mc stands for Monte-Carlo. N is an optional number of Monte-Carlo simulations. Default for N: 10" />
<param argument="--cupx" type="float" min="0" max="1" value="" label="--cupx" optional="true" help="upper limit for reverse fluxes. Must be in interval [0, 1]. Default: 0.999" />
<param argument="--cupn" type="float" min="0" value="" label="--cupn" optional="true" help="absolute limit for net fluxes: -cupn <= netflux <= cupn. Must be non negative. Value 0 means no limit. Default: 1.e3" />
<param argument="--cupp" type="float" min="0" value="" label="--cupp" optional="true" help="upper limit for metabolite pool. Default: 1.e5" />
<param argument="--clownr" type="float" min="0" value="" label="--clownr" optional="true" help="lower limit for not reversible free and dependent fluxes. Zero value (default) means no lower limit" />
<param argument="--cinout" type="float" min="0" value="" label="--cinout" optional="true" help="lower limit for input/output free and dependent fluxes. Must be non negative. Default: 0" />
<param argument="--clowp" type="float" min="0" value="" label="--clowp" optional="true" help="lower limit for free metabolite pools. Must be positive. Default 1.e-8" />
<param argument="--np" type="float" min="0" value="" label="--np" optional="true" help="When integer >= 1, it is a number of parallel subprocesses used in Monte-Carlo (MC) simulations or for multiple FTBL inputs. When NP is a float number between 0 and 1, it gives a fraction of available cores (rounded to closest integer) to be used. Without this option or for NP=0, all available cores in a given node are used for MC simulations." />
<param argument="--zc" type="float" min="0" value="" label="--zc" optional="true" help="Apply zero crossing strategy with non negative threshold for net fluxes" />
<param argument="--fseries" type="text" value="" label="--fseries" optional="true" help="File name with free parameter values for multiple starting points. Default: '' (empty, i.e. only one starting point from the FTBL file is used)" />
<param argument="--iseries" type="text" value="" label="--iseries" optional="true" help="Indexes of starting points to use. Format: '1:10' -- use only first ten starting points; '1,3' -- use the the first and third starting points; '1:10,15,91:100' -- a mix of both formats is allowed. Default: '' (empty, i.e. all provided starting points are used)" />
<param argument="--seed" type="integer" min="0" value="" label="--seed" optional="true" help="Integer (preferably a prime integer) used for reproducible random number generating. It makes reproducible random starting points (--irand) but also Monte-Carlo simulations for sensitivity analysis. Default: none, i.e. current system value is used, so random drawing will be varying at each run." />
<param argument="--excl_outliers" type="float" min="0" max="1" value="" label="--excl_outliers" optional="true" help="This option takes an optional argument, a p-value between 0 and 1 which is used to filter out measurement outliers. The filtering is based on Z statistics calculated on reduced residual distribution. Default: 0.01." />
<param argument="--tblimit" type="integer" min="0" value="0" label="--tblimit" optional="true" help="developer option: set trace back limit for python error messages" />
<param argument="--mtf" type="text" value="" label="--mtf MTF" optional="true" help="MTF is a coma separated list of files with following extensions: netw, linp, miso, mflux, mmet, tvar, cnstr, ftbl, vmtf. Only first 3 files are necessary to obtain a workable FTBL file, others are optional."/>
</section>
</inputs>
<outputs>
<collection name="influx_si_output" type="list:list" label="influx_${si.s_i}_on_${on_string}">
<discover_datasets match_relative_path="true" recurse="true" pattern="(?P<identifier_0>[^/]+)_res/(?P<identifier_1>[^/]+)\.(?P<ext>[^.]+)" visible="false"/>
</collection>
</outputs>
<tests>
<test>
<param name="input_main" value="e_coli.zip" />
<conditional name="si">
<param name="s_i" value="s" />
</conditional>
<output_collection name="influx_si_output" type="list:list" count="1">
<element name="e_coli" count="7">
<element name="e_coli.log">
<assert_contents>
<has_n_lines n="38"/>
<has_line_matching expression="^end.*"/>
</assert_contents>
</element>
</element>
</output_collection>
</test>
</tests>
<help><![CDATA[
Select one or several zip archives with MTF (Multiple TSV Files) sets, stationary/instationary labeling type and possibly some advanced option to run the tool.
Detailed documentation is available on https://influx-si.readthedocs.io
]]></help>
<citations>
<citation type="bibtex">
@misc{githubinflux,
author = {Sokol, Serguei},
year = {2023},
title = {influx_s},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/sgsokol/influx},
}
</citation>
<citation type="doi">10.1093/bioinformatics/btr716</citation>
</citations>
</tool>