comparison influx_si.xml @ 0:9b03a930b08b draft

"planemo upload commit 8e69ff6919990050909511d8bdfb520c19a4af72"
author workflow4metabolomics
date Mon, 04 May 2020 03:24:12 -0400
parents
children 4e3d4318113b
comparison
equal deleted inserted replaced
-1:000000000000 0:9b03a930b08b
1 <tool id="influx_si" name="influx_si" version="@TOOL_VERSION@+galaxy0" python_template_version="3.5">
2 <description>metabolic flux analysis</description>
3 <macros>
4 <token name="@TOOL_VERSION@">5.1.0</token>
5 </macros>
6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">influx_si</requirement>
8 </requirements>
9 <version_command>influx_s --version</version_command>
10 <command detect_errors="exit_code"><![CDATA[
11 #set $inp_all = [$input_main, ($prlexp.input_aux if $prlexp.input_aux else [])]
12 #if $si.s_i == 'i':
13 #silent $inp_all.append($si.input_ti)
14 #end if
15
16 mkdir outdir && cd outdir &&
17
18 #for $inp in $inp_all:
19 #for $i in $inp:
20 ln -s '$i' '$i.name' &&
21 #end for
22 #end for
23
24 influx_$si.s_i
25 $opt.noopt
26 $opt.noscale
27 #if $opt.meth != 'None':
28 $opt.meth
29 #end if
30 $opt.fullsys
31 $opt.emu
32 $opt.irand
33 #if $opt.sens:
34 --sens='$opt.sens'
35 #end if
36 #if $opt.cupx:
37 --cupx='$opt.cupx'
38 #end if
39 #if $opt.cupn:
40 --cupn='$opt.cupn'
41 #end if
42 #if $opt.cupp:
43 --cupp='$opt.cupp'
44 #end if
45 #if $opt.clownr:
46 --clownr='$opt.clownr'
47 #end if
48 #if $opt.cinout:
49 --cinout='$opt.cinout'
50 #end if
51 #if $opt.clowp:
52 --clowp='$opt.clowp'
53 #end if
54 #if $opt.np:
55 --np='$opt.np'
56 #end if
57 $opt.ln
58 $opt.sln
59 $opt.tikhreg
60 $opt.lim
61 #if $opt.zc:
62 --zc='$opt.zc'
63 #end if
64 $opt.ffguess
65 #if $opt.iseries:
66 --iseries='$opt.iseries'
67 #end if
68 #if $opt.seed:
69 --seed='$opt.seed'
70 #end if
71 #if $opt.excl_outliers:
72 --excl_outliers '$opt.excl_outliers'
73 #end if
74 $opt.nocalc
75 $opt.addnoise
76 $opt.TIMEIT
77 #if $opt.tblimit:
78 --tblimit='$opt.tblimit'
79 #end if
80
81 #if $si.s_i == 'i' and $si.time_order:
82 --time_order='$si.time_order'
83 #end if
84 '${"' '".join([str($in_m.name) for $in_m in $input_main])}'
85 > 'influx_${si.s_i}.stdout.txt' 2>'influx_${si.s_i}.stderr.txt'; res="\$?" &&
86
87 for f in *.ftbl *.log *.err *.R *.kvh *.attrs; do mv -f "\$f" "\$f".txt || true; done &&
88
89 for f in *.pdf; do [ -e "\$f" ] && mv -f "\$f" "\$f".pdf || true; done &&
90
91 for f in *.RData; do [ -e "\$f" ] && mv -f "\$f" "\$f".RData || true; done &&
92 [ "\$res" == "0" ]
93 ]]></command>
94 <inputs>
95 <param type="data" name="input_main" format="ftbl" multiple="true" label="main FTBL(s): network+data"/>
96 <conditional name="si">
97 <param name="s_i" type="select" label="labeling type" display="radio">
98 <option value="s">stationary</option>
99 <option value="i">instationary</option>
100 </param>
101 <when value="s"/>
102 <when value="i">
103 <param type="data" name="input_ti" label="time course data" format="txt,tsv" multiple="true"/>
104 <param argument="--time_order" type="select" label="time order for ODE solving" display="radio" optional="true" help="Order 2 is more precise but more time consuming. The value &#x27;1,2&#x27; makes to start solving the ODE with the first order scheme then continues with the order 2.">
105 <option value="None">None</option>
106 <option value="1">1</option>
107 <option value="2">2</option>
108 <option value="1,2">1,2</option>
109 </param>
110 </when>
111 </conditional>
112 <section name="prlexp" title="Parallel labeling experiments" expanded="false">
113 <param optional="true" type="data" name="input_aux" format="ftbl" multiple="True" label="auxiliary FTBL(s): data only"/>
114 </section>
115 <section name="opt" title="Advanced Options" expanded="false">
116 <param argument="--noopt" type="boolean" checked="false" truevalue="--noopt" falsevalue="" label="no optimization" optional="true" help=", just use free parameters as is (after a projection on feasibility domain), to calculate dependent fluxes, cumomers, stats and so on" />
117 <param argument="--noscale" type="boolean" checked="false" truevalue="--noscale" falsevalue="" label="no scaling factors to optimize" optional="true" help="all scaling factors are assumed to be 1" />
118 <param argument="--meth" type="select" label="method for optimization" optional="true">
119 <option value="--meth=BFGS">BFGS</option>
120 <option value="--meth=Nelder-Mead">Nelder-Mead</option>
121 <option value="--meth=nlsic">nlsic</option>
122 </param>
123 <param argument="--fullsys" type="boolean" checked="false" truevalue="--fullsys" falsevalue="" label="full cumomer system" optional="true" help="calculate all cumomer set (not just the reduced one necesary to simulate measurements)" />
124 <param argument="--emu" type="boolean" checked="false" truevalue="--emu" falsevalue="" label="simulate labeling in EMU approach" optional="true" />
125 <param argument="--irand" type="boolean" checked="false" truevalue="--irand" falsevalue="" label="random initial approximation" optional="true" help="ignore initial approximation for free parameters (free fluxes and metabolite concentrations) from the FTBL file (cf. also --iseries option) and use random values drawn uniformly from [0,1] interval" />
126 <param argument="--sens" type="text" value="" label="sensitivity method" optional="true" help="can be &#x27;mc[=N]&#x27;, mc stands for Monte-Carlo. N is an optional number of Monte-Carlo simulations. Default for N: 10" />
127 <param argument="--cupx" type="float" min="0" max="1" value="" label="upper limit for reverse fluxes" optional="true" help="Must be in interval [0, 1]. Default: 0.999" />
128 <param argument="--cupn" type="float" min="0" value="" label="absolute limit for net fluxes" optional="true" help="-cupn &lt;= netflux &lt;= cupn. Must be non negative. Value 0 means no limit. Default: 1.e3" />
129 <param argument="--cupp" type="float" min="0" value="" label="upper limit for metabolite pool" optional="true" help="Default: 1.e5" />
130 <param argument="--clownr" type="float" min="0" value="" label="lower limit for not reversible free and dependent fluxes" optional="true" help="Zero value (default) means no lower limit" />
131 <param argument="--cinout" type="float" min="0" value="" label="lower limit for input/output free and dependent fluxes" optional="true" help="Must be non negative. Default: 0" />
132 <param argument="--clowp" type="float" min="0" value="" label="lower limit for free metabolite pools" optional="true" help="Must be positive. Default 1.e-8" />
133 <param argument="--np" type="float" min="0" value="" label="process number" optional="true" help="When integer &gt;= 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." />
134 <param argument="--ln" type="boolean" checked="false" truevalue="--ln" falsevalue="" label="least norm" optional="true" help="Least norm solution is used for increments during the non-linear iterations when Jacobian is rank deficient" />
135 <param argument="--sln" type="boolean" checked="false" truevalue="--sln" falsevalue="" label="solution least norm" optional="true" help="Least norm of the solution of linearized problem (and not just of increments) is used when Jacobian is rank deficient" />
136 <param argument="--tikhreg" type="boolean" checked="false" truevalue="--tikhreg" falsevalue="" label="use Tikhonov regularization" optional="true" help="Approximate least norm solution is used for increments during the non-linear iterations when Jacobian is rank deficient" />
137 <param argument="--lim" type="boolean" checked="false" truevalue="--lim" falsevalue="" label="least norm from limSolve package" optional="true" help="The same as --ln but with a function limSolve::lsei()" />
138 <param argument="--zc" type="float" min="0" value="" label="zero crossing" optional="true" help="Apply zero crossing strategy with non negative threshold for net fluxes" />
139 <param argument="--ffguess" type="boolean" checked="false" truevalue="--ffguess" falsevalue="" label="free fluxes guess" optional="true" help="Don&#x27;t use free/dependent flux definitions from FTBL file(s). Make an automatic guess." />
140 <param argument="--iseries" type="text" value="" label="indexes of starting points" optional="true" help="When used jointly with --irand, allows generating multiple random starting points. Format: &#x27;1:10&#x27; -- use only first ten starting points; &#x27;1,3&#x27; -- use the the first and third starting points; &#x27;1:10,15,91:100&#x27; -- a mix of both formats is allowed. Default: &#x27;&#x27; (empty, i.e. all provided starting points are used)" />
141 <param argument="--seed" type="integer" min="0" value="" label="random 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." />
142 <param argument="--excl_outliers" type="float" min="0" max="1" value="" label="threshold for excluding 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." />
143 <param argument="--nocalc" type="boolean" checked="false" truevalue="--nocalc" falsevalue="" label="no calculation" optional="true" help="generate an R code but not execute it." />
144 <param argument="--addnoise" type="boolean" checked="false" truevalue="--addnoise" falsevalue="" label="add noise" optional="true" help="Add centered gaussian noise to simulated measurements written to _res.kvh file. SD of this noise is taken from FTBL file" />
145 <param argument="--TIMEIT" type="boolean" checked="false" truevalue="--TIMEIT" falsevalue="" label="measure timings" optional="true" help="developer option: measure cpu time or not" />
146 <param argument="--tblimit" type="integer" min="0" value="0" label="Python traceback limit" optional="true" help="developer option: set trace back limit for Python error messages" />
147 </section>
148 </inputs>
149 <outputs>
150 <collection name="influx_si_output" type="list" label="influx_${si.s_i}_on_${on_string}">
151 <discover_datasets pattern="__name_and_ext__" directory="outdir" visible="false"/>
152 </collection>
153 </outputs>
154 <tests>
155 <test>
156 <param name="input_main" value="e_coli.ftbl" />
157 <conditional name="si">
158 <param name="s_i" value="s" />
159 </conditional>
160 <output_collection name="influx_si_output" type="list">
161 <element name="e_coli.log" ftype="txt" file="e_coli.log" compare="sim_size" delta="100" />
162 </output_collection>
163 </test>
164 <test>
165 <param name="input_main" value="e_coli.ftbl,e_coli_growth.ftbl" />
166 <conditional name="si">
167 <param name="s_i" value="s" />
168 </conditional>
169 <output_collection name="influx_si_output" type="list">
170 <element name="e_coli_growth.log" ftype="txt" file="e_coli_growth.log" compare="sim_size" delta="100" />
171 </output_collection>
172 </test>
173 <test>
174 <param name="input_main" value="e_coli_i.ftbl" />
175 <conditional name="si">
176 <param name="s_i" value="i" />
177 <param name="input_ti" value="e_coli_msen.txt" />
178 <!--param name="time_order" value="1,2" /--> <!--How to pass single value with comma in it?-->
179 </conditional>
180 <output_collection name="influx_si_output" type="list">
181 <element name="e_coli_i.log" ftype="txt" file="e_coli_i.log" compare="sim_size" delta="100" />
182 </output_collection>
183 </test>
184 <test>
185 <param name="input_main" value="e_coli_1-Glc_exact.ftbl" />
186 <param name="input_aux" value="e_coli_U-Glc_exact.ftbl" />
187 <conditional name="si">
188 <param name="s_i" value="s" />
189 </conditional>
190 <output_collection name="influx_si_output" type="list">
191 <element name="e_coli_1-Glc_exact.log" file="e_coli_1-Glc_exact.log" compare="sim_size" delta="100" />
192 </output_collection>
193 </test>
194 </tests>
195 <help><![CDATA[
196 Usage: influx_s [options] /path/to/FTBL_file1 [FTBL_file2 [...]]
197
198 Optimize free fluxes and optionaly metabolite concentrations of a given static metabolic network defined in an FTBL file to fit 13C data provided in the same FTBL file.
199 ]]></help>
200 <citations>
201 <citation type="bibtex">
202 @misc{githubinflux,
203 author = {Sokol, Serguei},
204 year = {2020},
205 title = {influx_s},
206 publisher = {GitHub},
207 journal = {GitHub repository},
208 url = {https://github.com/sgsokol/influx},
209 }
210 </citation>
211 <citation type="doi">10.1093/bioinformatics/btr716</citation>
212 </citations>
213 </tool>