annotate metaMS/metams_lcms_annotate.xml @ 25:9f03c8587d6b draft default tip

MetExp msclust upload format changed from tabular to csv
author linda-bakker
date Fri, 24 Aug 2018 09:56:05 -0400
parents 7661f5ade5c4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
1 <tool id="metams_lcms_annotate" name="METAMS-LC/MS Annotate" version="0.0.4">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
2 <description> Runs metaMS process for LC/MS feature annotation</description>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
3 <requirements>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
4 <requirement type="package" version="3.1.1">R_bioc_metams</requirement>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
5 </requirements>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
6 <command interpreter="Rscript">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
7 metaMS_cmd_annotate.r
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
8 $constructed_db
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
9 $xsetData
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
10 $customMetaMSsettings
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
11 $outputFile
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
12 #if $mzTol.mzTolType == "fixed"
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
13 0
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
14 #else
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
15 "$mzTol.mass_error_function"
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
16 #end if
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
17 $htmlReportFile
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
18 $htmlReportFile.files_path
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
19 $outputLog
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
20 </command>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
21 <inputs>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
22 <param name="constructed_db" type="select" label="Constructed DB" help="Reference annotation database generated from matching measurements of a mixture of chemical standards
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
23 against a manually validated reference table which contains the key analytical information for each standard."
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
24 dynamic_options='get_directory_files("tool-data/shared/PRIMS-metabolomics/metaMS")'/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
25
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
26 <param name="xsetData" type="data" format="rdata" label="xcmsSet data file (xset RDATA)" help="E.g. output data file resulting from METAMS 'feature picking, aligning and grouping' run"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
27
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
28 <param name="protocolName" type="text" size="30" label="protocolName" value="e.g. Synapt.QTOF.RP"
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
29 help="Choose a name to give for the specific settings in the parameters below"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
30
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
31 <param name="rtdiff" type="float" size="10" value="1.5" label="rtdiff" help="(Annotation) Allowed rt difference (in minutes)"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
32
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
33 <conditional name="mzTol">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
34 <param name="mzTolType" type="select" size="30" label="(Annotation) m/z tolerance type">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
35 <option value="fixed" selected="true">Fixed tolerance</option>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
36 <option value="adaptive" >Adaptive tolerance</option>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
37 </param>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
38 <when value="fixed">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
39 <param name="mzdiff" type="float" size="10" value="0.005" label="mzdiff" help="(Annotation) Fixed mass tolerance" />
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
40 </when>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
41 <when value="adaptive">
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
42 <param name="ppm" type="float" size="10" value="5.0" label="ppm" help="(Annotation) Tolerance in ppm" />
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
43 <param name="mass_error_function" type="text" area="true" size="3x70" label="(Annotation) Mass error function"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
44 </when>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
45 </conditional>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
46
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
47 <param name="rtval" type="float" size="10" value="0.1" label="(max)rtval" help="(Validation) Group items are clustered once more with hierarchical clustering ('complete' method)
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
48 based on their rt distances. Here one can specify the rt threshold for removing the items that have too diverging rt (the ones with rt difference
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
49 larger than rtval). " />
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
50 <param name="minfeat" type="integer" size="10" value="2" label="minfeat"
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
51 help="(Validation) Threshold for the minimum number of features a
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
52 cluster/group should have (after rtval filtering above). Other clusters/groups are filtered out." />
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
53
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
54 </inputs>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
55 <configfiles>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
56
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
57 <configfile name="customMetaMSsettings">## start comment
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
58 ## metaMS process settings
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
59 customMetaMSsettings &lt;- metaMSsettings(protocolName = "${protocolName}",
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
60 chrom = "LC")
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
61 metaSetting(customMetaMSsettings, "match2DB") &lt;- list(
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
62 rtdiff = ${rtdiff},
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
63 rtval = ${rtval},
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
64 #if $mzTol.mzTolType == "fixed"
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
65 mzdiff = ${mzTol.mzdiff},
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
66 #else
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
67 ppm = ${mzTol.ppm},
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
68 #end if
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
69 minfeat = ${minfeat})</configfile>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
70
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
71 </configfiles>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
72
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
73 <outputs>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
74 <data name="outputFile" format="tabular" label="${tool.name} on ${on_string} - metaMS annotated file (TSV)"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
75 <data name="outputLog" format="txt" label="${tool.name} on ${on_string} - metaMS LOG" hidden="True"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
76 <data name="htmlReportFile" format="html" label="${tool.name} on ${on_string} - metaMS report (HTML)"/>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
77 </outputs>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
78 <tests>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
79 <test>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
80 </test>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
81 </tests>
12
pieter.lukasse@wur.nl
parents: 10
diff changeset
82 <code file="../match_library.py" /> <!-- file containing get_directory_files function used above-->
6
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
83 <help>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
84
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
85 .. class:: infomark
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
86
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
87 Runs metaMS process for LC/MS feature annotation based on matching to an existing 'standards' DB.
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
88 The figure below shows the main parts of this metaMS process.
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
89
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
90 .. image:: $PATH_TO_IMAGES/metaMS_annotate.png
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
91
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
92
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
93 .. class:: infomark
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
94
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
95 The implemented annotation strategy can be broken down in the following steps:
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
96
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
97 1. *Feature wise Annotation:* Each feature detected by runLC is matched against the database. If
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
98 the mass error function is provided, the appropriate m/z tolerance is calculated, otherwise a fixed
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
99 tolerance is used (mzdiff). The retention time tolerance is fixed and should be selected on the
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
100 bases of the characteristics of each chromatographic method (rtdiff). Multiple annotations - i.e.
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
101 features which are associated to more than one compound - are possible. This outcome does not
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
102 indicate a problem per se, but is an inherent drawback of co-elution.
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
103
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
104 2. *Annotation Validation:* The annotated features are organized in 'pseudospectra' collecting all
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
105 the experimental features which are assigned to a specific compound. A specific annotation is
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
106 confirmed only if more than minfeat features which differ in retention time less than rtval are
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
107 present in a pseudospectrum. As a general rule rtval should be narrower than rtdiff. The
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
108 latter, indeed, accounts for shifts in retention time between the injection of the standards and the
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
109 metabolomics experiment under investigation. This time can be rather long, considering that the
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
110 standards are not commonly re-analyzed each time. On the other hand, rtval represents the shift
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
111 between the ions of the same compound within the same batch of injections and therefore it has
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
112 only to account for the smaller shifts occurring during peak picking and alignment.
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
113
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
114
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
115 </help>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
116 <citations>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
117 <citation type="doi">10.1016/j.jchromb.2014.02.051</citation> <!-- example
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
118 see also https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Ccitations.3E_tag_set
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
119 -->
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
120 </citations>
4393f982d18f reorganized sources
pieter.lukasse@wur.nl
parents:
diff changeset
121 </tool>