annotate metams_lcms_annotate.xml @ 53:70574a6381ea

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