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