-
Notifications
You must be signed in to change notification settings - Fork 27
/
annotationRmn2D_xml.xml
429 lines (352 loc) · 19.6 KB
/
annotationRmn2D_xml.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<tool id="2DNmrAnnotation" name="2DNMRAnnotation" version="2.0.0" profile="20.09">
<description> Annotation of complex mixture bidimensional NMR spectra </description>
<requirements>
<requirement type="package" version="1.1_5">r-batch</requirement>
<requirement type="package" version="0.8.3">r-dplyr</requirement>
<requirement type="package" version="3.2.1">r-ggplot2</requirement>
<requirement type="package" version="4.0.17">r-openxlsx</requirement>
<requirement type="package" version="1.4.0">r-stringr</requirement>
<requirement type="package" version="1.0.2">r-tidyr</requirement>
<requirement type="package" version="3.3">r-curl</requirement>
<requirement type="package" version="1.6">r-jsonlite</requirement>
<requirement type="package">r-stringi</requirement>
</requirements>
<stdio>
<exit_code range="1:" level="fatal" />
</stdio>
<command>
## Wrapper + Libraries of 2D-NMR sequences for reference compounds
Rscript '$__tool_directory__/annotationRmn2DWrapper.R'
## XLS file
xlsfile '$zip_xlsfile'
## Parameters to reduce search
pH $pH
magneticField $magneticField
## 2D-NMR sequences to annotate
cosy_2dsequences $cosy_2dsequences
jres_2dsequences $jres_2dsequences
hmbc_2dsequences $hmbc_2dsequences
hsqc_2dsequences $hsqc_2dsequences
tocsy_2dsequences $tocsy_2dsequences
## In-house databases
inHouse_DB_choices.choice ${inHouse_DB_choices.choice}
#if str($inHouse_DB_choices.choice) == 'yes':
inHouse_DB_cosy.choice ${inHouse_DB_choices.inHouse_DB_cosy.choice}
#if str($inHouse_DB_choices.inHouse_DB_cosy.choice) == 'yes':
cosyDB $inHouse_DB_choices.inHouse_DB_cosy.cosyDB
#end if
inHouse_DB_hmbc.choice ${inHouse_DB_choices.inHouse_DB_hmbc.choice}
#if str($inHouse_DB_choices.inHouse_DB_hmbc.choice) == 'yes':
hmbcDB $inHouse_DB_choices.inHouse_DB_hmbc.hmbcDB
#end if
inHouse_DB_hsqc.choice ${inHouse_DB_choices.inHouse_DB_hsqc.choice}
#if str($inHouse_DB_choices.inHouse_DB_hsqc.choice) == 'yes':
hsqcDB $inHouse_DB_choices.inHouse_DB_hsqc.hsqcDB
#end if
inHouse_DB_jres.choice ${inHouse_DB_choices.inHouse_DB_jres.choice}
#if str($inHouse_DB_choices.inHouse_DB_jres.choice) == 'yes':
jresDB $inHouse_DB_choices.inHouse_DB_jres.jresDB
#end if
inHouse_DB_tocsy.choice ${inHouse_DB_choices.inHouse_DB_tocsy.choice}
#if str($inHouse_DB_choices.inHouse_DB_tocsy.choice) == 'yes':
tocsyDB $inHouse_DB_choices.inHouse_DB_tocsy.tocsyDB
#end if
#end if
## Tolerances
tolppm1 $tolppm1
tolppm2 $tolppm2
tolppmJRES $tolppmJRES
## Treshold (probability score)
threshold $threshold
## Unicity
unicity $unicity
## Outputs
logOut '$logOut'
annotationCOSY '$annotationCOSY'
ppmCommunCOSY '$ppmCommunCOSY'
annotationJRES '$annotationJRES'
ppmCommunJRES '$ppmCommunJRES'
annotationHMBC '$annotationHMBC'
ppmCommunHMBC '$ppmCommunHMBC'
annotationHSQC '$annotationHSQC'
ppmCommunHSQC '$ppmCommunHSQC'
annotationTOCSY '$annotationTOCSY'
ppmCommunTOCSY '$ppmCommunTOCSY'
annotationCombination '$annotationCombination'
AnnotationGraph '$AnnotationGraph'
</command>
<inputs>
<param name="zip_xlsfile" type="data" format="xlsx" label="File to annotate in xlsx format" />
<param name="pH" type="float" value="0" help="pH value of standards. Default value is 0 (no specific pH value required)" />
<param name="magneticField" type="integer" value="0" help="Magnetic filed of NMR spectrometer used to generate standard spectra. Default value is 0 (no specific field required)" />
<param name="cosy_2dsequences" type="select" label="2D-NMR COSY sequence">
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<param name="hmbc_2dsequences" type="select" label="2D-NMR HMBC sequence">
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<param name="hsqc_2dsequences" type="select" label="2D-NMR HSQC sequence">
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<param name="jres_2dsequences" type="select" label="2D-NMR JRES sequence">
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<param name="tocsy_2dsequences" type="select" label="2D-NMR TOCSY sequence">
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<conditional name="inHouse_DB_choices">
<param name="choice" type="select" label="In-house database" help="Choose if you want to use use in-house database to annotate" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<conditional name="inHouse_DB_cosy">
<param name="choice" type="select" label="COSY In-house database" help="Choose if you want to use use in-house database to annotate COSY sequence" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<param name="cosyDB" type="data" format="no_unzip.zip" label="Zip file of the COSY RData object" />
</when>
<when value="no" />
</conditional>
<conditional name="inHouse_DB_hmbc">
<param name="choice" type="select" label="HMBC In-house database" help="Choose if you want to use use in-house database to annotate HMBC sequence" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<param name="hmbcDB" type="data" format="no_unzip.zip" label="Zip file of the HMBC RData object" />
</when>
<when value="no" />
</conditional>
<conditional name="inHouse_DB_hsqc">
<param name="choice" type="select" label="HSQC In-house database" help="Choose if you want to use use in-house database to annotate HSQC sequence" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<param name="hsqcDB" type="data" format="no_unzip.zip" label="Zip file of the HSQC RData object" />
</when>
<when value="no" />
</conditional>
<conditional name="inHouse_DB_jres">
<param name="choice" type="select" label="JRES In-house database" help="Choose if you want to use use in-house database to annotate JRES sequence" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<param name="jresDB" type="data" format="no_unzip.zip" label="Zip file of the JRES RData object" />
</when>
<when value="no" />
</conditional>
<conditional name="inHouse_DB_tocsy">
<param name="choice" type="select" label="TOCSY In-house database" help="Choose if you want to use use in-house database to annotate TOCSY sequence" >
<option value="yes" > yes </option>
<option value="no" selected="true"> no </option>
</param>
<when value="yes">
<param name="tocsyDB" type="data" format="no_unzip.zip" label="Zip file of the TOCSY RData object" />
</when>
<when value="no" />
</conditional>
</when>
<when value="no" />
</conditional>
<param name="tolppm1" type="float" min="0" value="0.01" help="Tolerance on chemical shift for the x-axis (H). Default value is 0.01ppm" />
<param name="tolppm2" type="float" min="0" value="0.5" help="Tolerance on chemical shift for the y-axis (C). Default value is 0.01ppm" />
<param name="tolppmJRES" type="float" min="0" value="0.002" help="Tolerance on chemical shift for the y-axis for the JRES sequence. Default value is 0.002 (Hz)" />
<param name="threshold" type="float" min="0" max="1" value="0" help="Treshold on score of presence. Default value is 0" />
<param name="unicity" label="Unicity of annotation" type="select" display="radio" help="Select only chemical shifts corresponding to one one metabolite">
<option value="no">No</option>
<option value="yes">Yes</option>
</param>
</inputs>
<outputs>
<data format="txt" name="logOut" label="${tool.name}_log" />
<data format="tabular" name="annotationCOSY" label="${tool.name}_annotationCOSY" >
<filter> cosy_2dsequences != "no" </filter>
</data>
<data format="tabular" name="ppmCommunCOSY" label="${tool.name}_uplicateCOSY" >
<filter> cosy_2dsequences != "no" </filter>
</data>
<data format="tabular" name="annotationJRES" label="${tool.name}_annotationJRES" >
<filter> jres_2dsequences != "no" </filter>
</data>
<data format="tabular" name="ppmCommunJRES" label="${tool.name}_duplicateJRES" >
<filter> jres_2dsequences != "no" </filter>
</data>
<data format="tabular" name="annotationHMBC" label="${tool.name}_annotationHMBC" >
<filter> hmbc_2dsequences != "no" </filter>
</data>
<data format="tabular" name="ppmCommunHMBC" label="${tool.name}_duplicateHMBC" >
<filter> hmbc_2dsequences != "no" </filter>
</data>
<data format="tabular" name="annotationHSQC" label="${tool.name}_annotationHSQC" >
<filter> hsqc_2dsequences != "no" </filter>
</data>
<data format="tabular" name="ppmCommunHSQC" label="${tool.name}_duplicateHSQC" >
<filter> hsqc_2dsequences != "no" </filter>
</data>
<data format="tabular" name="annotationTOCSY" label="${tool.name}_annotationTOCSY" >
<filter> tocsy_2dsequences != "no" </filter>
</data>
<data format="tabular" name="ppmCommunTOCSY" label="${tool.name}_duplicateTOCSY" >
<filter> tocsy_2dsequences != "no" </filter>
</data>
<data format="tabular" name="annotationCombination" label="${tool.name}_annotationCombination" />
<data format="pdf" name="AnnotationGraph" label="${tool.name}_graph" />
</outputs>
<tests>
<test expect_num_outputs="13">
<param name="zip_xlsfile" value="Template_melange.xlsx" ftype="xlsx"/>
<param name="cosy_2dsequences" value="yes"/>
<param name="jres_2dsequences" value="yes"/>
<param name="hmbc_2dsequences" value="yes"/>
<param name="hsqc_2dsequences" value="yes"/>
<param name="tocsy_2dsequences" value="yes"/>
<param name="inHouse_DB_choices.choice" value="no"/>
<param name="tolppm1" value="0.01"/>
<param name="tolppm2" value="0.5"/>
<param name="tolppmJRES" value="0.002"/>
<param name="threshold" value="0.3"/>
<param name="unicity" value="no"/>
<output name="annotationCOSY" file="2DNMRAnnotation_annotationCOSY.tabular"/>
<output name="ppmCommunCOSY" file="2DNMRAnnotation_duplicateCOSY.tabular"/>
<output name="annotationHMBC" file="2DNMRAnnotation_annotationHMBC.tabular"/>
<output name="ppmCommunHMBC" file="2DNMRAnnotation_duplicateHMBC.tabular"/>
<output name="annotationHSQC" file="2DNMRAnnotation_annotationHSQC.tabular"/>
<output name="ppmCommunHSQC" file="2DNMRAnnotation_duplicateHSQC.tabular"/>
<output name="annotationJRES" file="2DNMRAnnotation_annotationJRES.tabular"/>
<output name="ppmCommunJRES" file="2DNMRAnnotation_duplicateJRES.tabular"/>
<output name="annotationTOCSY" file="2DNMRAnnotation_annotationTOCSY.tabular"/>
<output name="ppmCommunTOCSY" file="2DNMRAnnotation_duplicateTOCSY.tabular"/>
<output name="annotationCombination" file="2DNMRAnnotation_annotationCombination.tabular"/>
</test>
</tests>
<help>
.. class:: infomark
**Authors** Marie Tremblay-Franco ([email protected]), Coline Gardou
.. class:: infomark
---------------------------------------------------
============================
Bidimensional NMR Annotation
============================
-----------
Description
-----------
BARSA is an automatic algorithm for bi-dimensional NMR spectra annotation
-----------------
Workflow position
-----------------
**Upstream tools**
========================= ================= ======= =========
Name output file format parameter
========================= ================= ======= =========
NA NA NA NA
========================= ================= ======= =========
**Downstream tools**
========================= ================= ======= =========
Name output file format parameter
========================= ================= ======= =========
NA NA NA NA
========================= ================= ======= =========
-----------
Input files
-----------
+---------------------------+------------+
| Parameter : num + label | Format |
+===========================+============+
| 1 : Choose your inputs | xlsx |
+---------------------------+------------+
**Choose your inputs**
| xlsx file can include several peak lists, coming from several 2D NMR sequences
|
.. image:: ./static/images/2DNmr_FileToAnnotate_xlsxFormat.png
----------
Parameters
----------
Bi-dimensional NMR peak list(s) to annotate; select one or more sequence(s)
| COSY: yes/no
| JRES: yes/no
| HMBC: yes/no
| HSQC: yes/no
| TOCSY: yes/no
| Default value is no
|
In-house databases
| Use of your own databases to annotate peak list(s)
| If YES: parameters **COSY In-house database**, **JRES In-house database**, ** HMBC In-house database**, **HSQC In-house database** and **TOCSY In-house database** are visible
| Select one or more in-house database
|
Tolerances
| tolppm1: Maximum variation of the chemical shift (due to experimental conditions) of a peak along the x-axis
| tolppm2: Maximum variation of the chemical shift (due to experimental conditions) of a peak along the y-axis
| tolppmJRES: Maximum variation of the chemical shift (due to experimental conditions) of a peak for the JRES sequence
| Default values: 0.01 and 0.01 ppm; 0.002 Hz
|
Threshold
| All metabolites with a presence probability (number of detected peak(s)/number of theoretical peak(s)) under this threshold are removed
| Default value: 0
|
Unicity of annotation
| All the peaks assigned to more than one metabolite are removed
|
------------
Output files
------------
COSY
| tabular outputs
| annotationCOSY: Array with p rows (corresponding to the identified metabolites) and 4 columns containing the chemical shift on the x-axis, the chemical shift on the y-axis, the metabolite name and the presence probability
| ppmCommunCOSY: Array containing for all the peaks assigned to more than one metabolite: the chemical shift on the x-axis, the chemical shift on the y-axis and the list of assigned metabolites
| Only display if COSY was chosen
|
JRES
| tabular outputs
| annotationJRES: Array with p rows (corresponding to the identified metabolites) and 4 columns containing the chemical shift on the x-axis, the chemical shift on the y-axis, the metabolite name and the presence probability
| ppmCommunJRES: Array containing for all the peaks assigned to more than one metabolite: the chemical shift on the x-axis, the chemical shift on the y-axis and the list of assigned metabolites
| Only display if JRES was chosen
|
HMBC
| tabular outputs
| annotationHMBC: Array with p rows (corresponding to the identified metabolites) and 4 columns containing the chemical shift on the x-axis, the chemical shift on the y-axis, the metabolite name and the presence probability
| ppmCommunHMBC: Array containing for all the peaks assigned to more than one metabolite: the chemical shift on the x-axis, the chemical shift on the y-axis and the list of assigned metabolites
| Only display if HMBC was chosen
|
HSQC
| tabular outputs
| annotationHSQC: Array with p rows (corresponding to the identified metabolites) and 4 columns containing the chemical shift on the x-axis, the chemical shift on the y-axis, the metabolite name and the presence probability
| ppmCommunHSQC: Array containing for all the peaks assigned to more than one metabolite: the chemical shift on the x-axis, the chemical shift on the y-axis and the list of assigned metabolites
| Only display if HSQC was chosen
|
TOCSY
| tabular outputs
| annotationTOCSY: Array with p rows (corresponding to the identified metabolites) and 4 columns containing the chemical shift on the x-axis, the chemical shift on the y-axis, the metabolite name and the presence probability
| ppmCommunTOCSY: Array containing for all the peaks assigned to more than one metabolite: the chemical shift on the x-axis, the chemical shift on the y-axis and the list of assigned metabolites
| Only display if TOCSY was chosen
|
annotationCombination
| tabular outputs
| Array with p rows (corresponding to the identified metabolites) including the Metabolite name, the COSY presence probability, the JRES presence probability, the HMBC presence probability, the HSQC presence probability, the TOCSY presence probability and the averageScore
| Depends on the chosen sequences
| Only display if 2 or more sequences have be chosen
AnnotationGraph.pdf
| pdf output
| Bi-dimensional graphical chart of real pairs of chemical shifts, with name of identified metabolites
---------------------------------------------------
-------
Example
-------
Example of output files obtaining wehn running the algorithm on a mix of 23 known compounds
.. image:: ./static/images/OutputsExampleMix.png
:width: 500
</help>
<citations>
<citation type="doi">10.1093/bioinformatics/btu813</citation>
</citations>
</tool>