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