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