2
|
1 <tool id="xseeker_preparator"
|
0
|
2 name="XSeeker Preparator"
|
2
|
3 version="1.0.1"
|
0
|
4 >
|
|
5 <description>Prepare RData file from CAMERA to be visualized in XSeeker</description>
|
|
6
|
|
7 <edam_operations>
|
|
8 <edam_operation>operation_1812</edam_operation>
|
|
9 <edam_operation>operation_0335</edam_operation>
|
|
10 </edam_operations>
|
|
11
|
|
12 <requirements>
|
3
|
13 <requirement type="set_environment">R_SCRIPT</requirement>
|
0
|
14 <requirement type="package" version="4.0.0">R</requirement>
|
|
15 <requirement type="package" version="1.6.6">optparse</requirement>
|
|
16 <requirement type="package" version="3.10.2">xcms</requirement>
|
|
17 <requirement type="package" version="1.2.1">blob</requirement>
|
|
18 <requirement type="package" version="0.9.4">fst</requirement>
|
|
19 <requirement type="package" version="1.4.0">stringr</requirement>
|
|
20 <requirement type="package">DBModelR</requirement>
|
|
21 </requirements>
|
|
22
|
|
23 <stdio>
|
|
24
|
|
25 <exit_code
|
|
26 range="1"
|
|
27 level="warning"
|
|
28 description="Selected samples have no data associated to them."
|
|
29 />
|
|
30
|
|
31 <exit_code
|
|
32 range="2"
|
|
33 level="warning"
|
|
34 description="Some samples have no data associated to them."
|
|
35 />
|
|
36
|
|
37 </stdio>
|
|
38
|
|
39 <version_command>
|
3
|
40 $R_SCRIPT '$__tool_directory__/XSeekerPreparator.R' -v
|
0
|
41 </version_command>
|
|
42
|
|
43 <command>
|
|
44 <![CDATA[
|
3
|
45 $R_SCRIPT '$__tool_directory__/XSeekerPreparator.R'
|
0
|
46
|
|
47 -P
|
|
48
|
|
49 --input '$input'
|
|
50 --output '$output'
|
|
51
|
|
52 #if $samples.selected
|
|
53 --samples '${",".join(samples.selected)}'
|
|
54 #end if
|
|
55
|
|
56 #if $database.archetypes
|
|
57 --archetype '${",".join($database.archetypes)}'
|
|
58 #end if
|
|
59
|
|
60 #if $database.base.kind == "tabular"
|
|
61 --compounds-csv '${database.base.tabular}'
|
|
62 #else if $database.base.kind == "sql"
|
|
63 --database '${database.base.sql}'
|
|
64 #end if
|
|
65
|
|
66 #if $database.models.kind == "default"
|
|
67 --models '${base_config}'
|
|
68 #else
|
|
69 --models '${database.models.url}'
|
|
70 #end if
|
|
71
|
|
72 ]]>
|
|
73
|
|
74 </command>
|
|
75
|
|
76 <inputs>
|
|
77 <param
|
|
78 name="input"
|
|
79 type="data"
|
|
80 multiple="false"
|
|
81 label="Rdata to prepare"
|
|
82 optional="false"
|
|
83 format="rdata"
|
|
84 >
|
|
85 </param>
|
|
86 <section name="samples" title="Samples Options" expanded="false">
|
|
87 <param
|
|
88 name="selected"
|
|
89 type="data"
|
|
90 multiple="true"
|
|
91 label="Samples to visualize"
|
|
92 optional="true"
|
|
93 format="mzml"
|
|
94 >
|
|
95 </param>
|
|
96 </section>
|
|
97
|
|
98 <section name="database" title="Database Options" expanded="false">
|
|
99 <param
|
|
100 name="archetypes"
|
|
101 type="select"
|
|
102 multiple="true"
|
|
103 label="Molecule family (for database's compounds enrichment)"
|
|
104 >
|
|
105 <option value="G" selected="true">General</option>
|
|
106 <option value="H">Halogenates</option>
|
|
107 </param>
|
|
108
|
|
109 <conditional name="base">
|
|
110 <param name="kind" type="select" label="File containing compound's type">
|
|
111 <option value="none" selected="true">None (deafult)</option>
|
|
112 <option value="tabular">tabular</option>
|
|
113 <option value="sql">sql</option>
|
|
114 </param>
|
|
115 <when value="tabular">
|
|
116 <param
|
|
117 name="tabular"
|
|
118 type="data"
|
|
119 multiple="true"
|
|
120 label="Tabular file containing compound to use in XSeeker"
|
|
121 optional="true"
|
|
122 format="tabular"
|
|
123 >
|
|
124 </param>
|
|
125 </when>
|
|
126 <when value="sql">
|
|
127 <param
|
|
128 name="sql"
|
|
129 type="data"
|
|
130 multiple="true"
|
|
131 label="SQL file containing compound to use in XSeeker"
|
|
132 optional="true"
|
|
133 format="sql"
|
|
134 >
|
|
135 </param>
|
|
136 </when>
|
|
137 </conditional>
|
|
138
|
|
139 <conditional name="models">
|
|
140 <param name="kind" type="select" label="How is the database's model defined">
|
|
141 <option value="default" selected="true">Default (regular XSeeker Database)</option>
|
|
142 <option value="url">Download model file</option>
|
|
143 <option value="git">Get versionned model file</option>
|
|
144 </param>
|
|
145 <when value="url">
|
|
146 <param name="url" type="text" format="url" label="File URL"/>
|
|
147 </when>
|
|
148 <when value="git">
|
|
149 <param name="url" type="text" format="url" label="Repo URL"/>
|
|
150 </when>
|
|
151 </conditional>
|
|
152 </section>
|
|
153 </inputs>
|
|
154
|
|
155
|
|
156 <outputs>
|
3
|
157 <data format="sqlite" name="output" />
|
0
|
158 </outputs>
|
|
159
|
|
160 <configfiles>
|
|
161 <configfile name="base_config">
|
|
162 tryCatch({
|
|
163 DBModelR::ModelDefinition(table="yui", fields=list(yui="INTEGER"))
|
|
164 }, error=function(e) {
|
|
165 stop("Please, install DBModelR before you source this file.")
|
|
166 })
|
|
167
|
|
168 list(
|
|
169 adduct=DBModelR::ModelDefinition(
|
|
170 table="adduct",
|
|
171 fields=list(
|
|
172 name="TEXT",
|
|
173 mass="FLOAT",
|
|
174 charge="INTEGER",
|
|
175 multi="INTEGER",
|
|
176 formula_add="TEXT",
|
|
177 formula_ded="TEXT",
|
|
178 sign="TEXT",
|
|
179 oidscore="INTEGER",
|
|
180 quasi="INTEGER",
|
|
181 ips="FLOAT"
|
|
182 )
|
|
183 ),
|
|
184 cluster=DBModelR::ModelDefinition(
|
|
185 table="cluster",
|
|
186 fields=list(
|
|
187 clusterID="INTEGER",
|
|
188 formula="TEXT",
|
|
189 annotation="TEXT",
|
|
190 coeff="FLOAT",
|
|
191 r_squared="FLOAT",
|
|
192 charge="INTEGER",
|
|
193 mean_rt="FLOAT",
|
|
194 score="FLOAT",
|
|
195 deviation="FLOAT",
|
|
196 status="TEXT",
|
|
197 adduct="TEXT",
|
|
198 curent_group="INTEGER",
|
|
199 pc_group="INTEGER",
|
|
200 align_group="INTEGER",
|
|
201 xcms_group="INTEGER"
|
|
202 ),
|
|
203 one=list("sample", "compound")
|
|
204 ),
|
|
205 compound=DBModelR::ModelDefinition(
|
|
206 table="compound",
|
|
207 fields=list(
|
|
208 name="TEXT",
|
|
209 common_name="TEXT",
|
|
210 formula="TEXT",
|
|
211 charge="INTEGER",
|
|
212 date="TEXT",
|
|
213 mz="FLOAT"
|
|
214 )
|
|
215 ),
|
|
216 feature=DBModelR::ModelDefinition(
|
|
217 table="feature",
|
|
218 fields=list(
|
|
219 featureID="INTEGER",
|
|
220 mz="FLOAT",
|
|
221 mz_min="FLOAT",
|
|
222 mz_max="FLOAT",
|
|
223 rt="FLOAT",
|
|
224 rt_min="FLOAT",
|
|
225 rt_max="FLOAT",
|
|
226 int_o="FLOAT",
|
|
227 int_b="FLOAT",
|
|
228 max_o="FLOAT",
|
|
229 iso="TEXT",
|
|
230 abundance="FLOAT"
|
|
231 ),
|
|
232 one=list("cluster")
|
|
233 ),
|
|
234 instrument=DBModelR::ModelDefinition(
|
|
235 table="instrument",
|
|
236 fields=list(
|
|
237 model="TEXT",
|
|
238 manufacturer="TEXT",
|
|
239 analyzer="TEXT",
|
|
240 detector_type="TEXT",
|
|
241 ion_source="TEXT"
|
|
242 )
|
|
243 ),
|
|
244 instrument_config=DBModelR::ModelDefinition(
|
|
245 table="instrument_config",
|
|
246 fields=list(
|
|
247 resolution="TEXT",
|
|
248 agc_target="TEXT",
|
|
249 maximum_IT="TEXT",
|
|
250 number_of_scan_range="TEXT",
|
|
251 scan_range="TEXT",
|
|
252 version="TEXT"
|
|
253 )
|
|
254 ),
|
|
255 project=DBModelR::ModelDefinition(
|
|
256 table="project",
|
|
257 fields=list(
|
|
258 name="TEXT",
|
|
259 comment="TEXT"
|
|
260 ),
|
|
261 one=list("sample")
|
|
262 ),
|
|
263 sample=DBModelR::ModelDefinition(
|
|
264 table="sample",
|
|
265 fields=list(
|
|
266 name="TEXT",
|
|
267 path="TEXT",
|
|
268 polarity="TEXT",
|
|
269 kind="TEXT", ## rdata or mxml or enriched_rdata
|
|
270 raw="BLOB"
|
|
271 ),
|
|
272 one=list(
|
|
273 "peak_picking_parameters",
|
|
274 "pairing_parameters",
|
|
275 "alignmenmt_parameters",
|
|
276 "camera_parameters",
|
|
277 "instrument",
|
|
278 "instrument_config",
|
|
279 "software",
|
|
280 "smol_xcms_set"
|
|
281 )
|
|
282 ),
|
|
283 smol_xcms_set=DBModelR::ModelDefinition(
|
|
284 table="smol_xcms_set",
|
|
285 fields=list(
|
|
286 raw="BLOB"
|
|
287 )
|
|
288 ),
|
|
289 software=DBModelR::ModelDefinition(
|
|
290 table="software",
|
|
291 fields=list(
|
|
292 name="TEXT",
|
|
293 version="TEXT"
|
|
294 )
|
|
295 ),
|
|
296 peak_picking_parameters=DBModelR::ModelDefinition(
|
|
297 table="peak_picking_parameters",
|
|
298 fields=list(
|
|
299 ppm="FLOAT",
|
|
300 peakwidth="TEXT",
|
|
301 snthresh="TEXT",
|
|
302 prefilterStep="TEXT",
|
|
303 prefilterLevel="TEXT",
|
|
304 mzdiff="TEXT",
|
|
305 fitgauss="TEXT",
|
|
306 noise="TEXT",
|
|
307 mzCenterFun="TEXT",
|
|
308 integrate="INTEGER",
|
|
309 firstBaselineCheck="TEXT",
|
|
310 snthreshIsoROIs="TEXT",
|
|
311 maxCharge="INTEGER",
|
|
312 maxIso="INTEGER",
|
|
313 mzIntervalExtension="TEXT"
|
|
314 )
|
|
315 ),
|
|
316 alignmenmt_parameters=DBModelR::ModelDefinition(
|
|
317 table="alignmenmt_parameters",
|
|
318 fields=list(
|
|
319 binSize="TEXT",
|
|
320 centerSample="TEXT",
|
|
321 response="TEXT",
|
|
322 distFun="TEXT",
|
|
323 gapInit="TEXT",
|
|
324 gapExtend="TEXT",
|
|
325 factorDiag="TEXT",
|
|
326 factorGap="TEXT",
|
|
327 localAlignment="INTEGER",
|
|
328 initPenalty="TEXT",
|
|
329 bw="TEXT",
|
|
330 minFraction="TEXT",
|
|
331 minSamples="TEXT",
|
|
332 maxFeatures="TEXT"
|
|
333 )
|
|
334 )
|
|
335 )
|
|
336 </configfile>
|
|
337 </configfiles>
|
|
338 </tool>
|