2
|
1 <tool id="xseeker_preparator"
|
|
2 name="XSeeker Preparator"
|
13
|
3 version="1.2.1"
|
2
|
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>
|
2
|
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
|
2
|
43 </version_command>
|
|
44
|
|
45 <command>
|
|
46 <![CDATA[
|
4
|
47 Rscript '$__tool_directory__/XSeekerPreparator.R'
|
2
|
48
|
|
49 -P
|
|
50
|
|
51 --input '$input'
|
|
52 --output '$output'
|
|
53
|
|
54 #if $samples.selected
|
4
|
55 --samples '${",".join($samples.selected)}'
|
2
|
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" /> -->
|
2
|
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 curent_group="INTEGER",
|
|
201 pc_group="INTEGER",
|
|
202 align_group="INTEGER",
|
|
203 xcms_group="INTEGER"
|
|
204 ),
|
12
|
205 one=list("sample", "compound", "adduct")
|
2
|
206 ),
|
|
207 compound=DBModelR::ModelDefinition(
|
|
208 table="compound",
|
|
209 fields=list(
|
|
210 name="TEXT",
|
|
211 common_name="TEXT",
|
|
212 formula="TEXT",
|
|
213 charge="INTEGER",
|
|
214 date="TEXT",
|
|
215 mz="FLOAT"
|
|
216 )
|
|
217 ),
|
|
218 feature=DBModelR::ModelDefinition(
|
|
219 table="feature",
|
|
220 fields=list(
|
|
221 featureID="INTEGER",
|
|
222 mz="FLOAT",
|
|
223 mz_min="FLOAT",
|
|
224 mz_max="FLOAT",
|
|
225 rt="FLOAT",
|
|
226 rt_min="FLOAT",
|
|
227 rt_max="FLOAT",
|
|
228 int_o="FLOAT",
|
|
229 int_b="FLOAT",
|
|
230 max_o="FLOAT",
|
|
231 iso="TEXT",
|
|
232 abundance="FLOAT"
|
|
233 ),
|
|
234 one=list("cluster")
|
|
235 ),
|
|
236 instrument=DBModelR::ModelDefinition(
|
|
237 table="instrument",
|
|
238 fields=list(
|
|
239 model="TEXT",
|
|
240 manufacturer="TEXT",
|
|
241 analyzer="TEXT",
|
|
242 detector_type="TEXT",
|
|
243 ion_source="TEXT"
|
|
244 )
|
|
245 ),
|
|
246 instrument_config=DBModelR::ModelDefinition(
|
|
247 table="instrument_config",
|
|
248 fields=list(
|
|
249 resolution="TEXT",
|
|
250 agc_target="TEXT",
|
|
251 maximum_IT="TEXT",
|
|
252 number_of_scan_range="TEXT",
|
|
253 scan_range="TEXT",
|
|
254 version="TEXT"
|
|
255 )
|
|
256 ),
|
|
257 project=DBModelR::ModelDefinition(
|
|
258 table="project",
|
|
259 fields=list(
|
|
260 name="TEXT",
|
|
261 comment="TEXT"
|
|
262 ),
|
|
263 one=list("sample")
|
|
264 ),
|
|
265 sample=DBModelR::ModelDefinition(
|
|
266 table="sample",
|
|
267 fields=list(
|
|
268 name="TEXT",
|
|
269 path="TEXT",
|
|
270 polarity="TEXT",
|
|
271 kind="TEXT", ## rdata or mxml or enriched_rdata
|
|
272 raw="BLOB"
|
|
273 ),
|
|
274 one=list(
|
|
275 "peak_picking_parameters",
|
|
276 "pairing_parameters",
|
|
277 "alignmenmt_parameters",
|
|
278 "camera_parameters",
|
|
279 "instrument",
|
|
280 "instrument_config",
|
|
281 "software",
|
|
282 "smol_xcms_set"
|
|
283 )
|
|
284 ),
|
|
285 smol_xcms_set=DBModelR::ModelDefinition(
|
|
286 table="smol_xcms_set",
|
|
287 fields=list(
|
|
288 raw="BLOB"
|
|
289 )
|
|
290 ),
|
|
291 software=DBModelR::ModelDefinition(
|
|
292 table="software",
|
|
293 fields=list(
|
|
294 name="TEXT",
|
|
295 version="TEXT"
|
|
296 )
|
|
297 ),
|
|
298 peak_picking_parameters=DBModelR::ModelDefinition(
|
|
299 table="peak_picking_parameters",
|
|
300 fields=list(
|
|
301 ppm="FLOAT",
|
|
302 peakwidth="TEXT",
|
|
303 snthresh="TEXT",
|
|
304 prefilterStep="TEXT",
|
|
305 prefilterLevel="TEXT",
|
|
306 mzdiff="TEXT",
|
|
307 fitgauss="TEXT",
|
|
308 noise="TEXT",
|
|
309 mzCenterFun="TEXT",
|
|
310 integrate="INTEGER",
|
|
311 firstBaselineCheck="TEXT",
|
|
312 snthreshIsoROIs="TEXT",
|
|
313 maxCharge="INTEGER",
|
|
314 maxIso="INTEGER",
|
|
315 mzIntervalExtension="TEXT"
|
|
316 )
|
|
317 ),
|
|
318 alignmenmt_parameters=DBModelR::ModelDefinition(
|
|
319 table="alignmenmt_parameters",
|
|
320 fields=list(
|
|
321 binSize="TEXT",
|
|
322 centerSample="TEXT",
|
|
323 response="TEXT",
|
|
324 distFun="TEXT",
|
|
325 gapInit="TEXT",
|
|
326 gapExtend="TEXT",
|
|
327 factorDiag="TEXT",
|
|
328 factorGap="TEXT",
|
|
329 localAlignment="INTEGER",
|
|
330 initPenalty="TEXT",
|
|
331 bw="TEXT",
|
|
332 minFraction="TEXT",
|
|
333 minSamples="TEXT",
|
|
334 maxFeatures="TEXT"
|
|
335 )
|
|
336 )
|
|
337 )
|
|
338 </configfile>
|
|
339 </configfiles>
|
|
340 </tool>
|