# HG changeset patch
# User pieter.lukasse@wur.nl
# Date 1418303367 -3600
# Node ID 70574a6381eaef16258ba9cb7d3f0b0d97e92d90
# Parent 5b1adc49700dc07ca128ffbcca2a8c8642a4a547
small fixes
diff -r 5b1adc49700d -r 70574a6381ea metaMS_cmd_annotate.r
--- a/metaMS_cmd_annotate.r Thu Dec 11 10:26:17 2014 +0100
+++ b/metaMS_cmd_annotate.r Thu Dec 11 14:09:27 2014 +0100
@@ -10,13 +10,16 @@
## output file names, e.g. "E:/Rworkspace/metaMS/data/out.txt"
args.outAnnotationTable <- args[4]
+args.mass_error_function <- args[5]
+if (args.mass_error_function == "0")
+ args.mass_error_function <- NULL
## report files
-args.htmlReportFile <- args[5]
-args.htmlReportFile.files_path <- args[6]
+args.htmlReportFile <- args[6]
+args.htmlReportFile.files_path <- args[7]
-if (length(args) == 7)
+if (length(args) == 8)
{
- args.outLogFile <- args[7]
+ args.outLogFile <- args[8]
# suppress messages:
# Send all STDERR to STDOUT using sink() see http://mazamascience.com/WorkingWithData/?p=888
msg <- file(args.outLogFile, open="wt")
@@ -43,7 +46,7 @@
# Just to highlight: if you want to use more than one
# trigger runLC:
- LC <- runLC(xset=xsetData, settings = tempEnv[["customMetaMSsettings"]], DB = tempEnv[[testDB[1]]]$DB, nSlaves=20, returnXset = TRUE)
+ LC <- runLC(xset=xsetData, settings = tempEnv[["customMetaMSsettings"]], DB = tempEnv[[testDB[1]]]$DB, errf=args.mass_error_function, nSlaves=20, returnXset = TRUE)
# write out runLC annotation results:
write.table(LC$PeakTable, args.outAnnotationTable, sep="\t", row.names=FALSE)
@@ -52,7 +55,7 @@
cat("\nConstructed DB info===============:\n")
str(tempEnv[[testDB[1]]]$Info)
cat("\nConstructed DB table===============:\n")
- if (length(args) == 7)
+ if (length(args) == 8)
{
write.table(tempEnv[[testDB[1]]]$DB, args.outLogFile, append=TRUE, row.names=FALSE)
write.table(tempEnv[[testDB[1]]]$Reftable, args.outLogFile, sep="\t", append=TRUE, row.names=FALSE)
diff -r 5b1adc49700d -r 70574a6381ea metams_lcms_annotate.xml
--- a/metams_lcms_annotate.xml Thu Dec 11 10:26:17 2014 +0100
+++ b/metams_lcms_annotate.xml Thu Dec 11 14:09:27 2014 +0100
@@ -9,6 +9,11 @@
$xsetData
$customMetaMSsettings
$outputFile
+ #if $mzTol.mzTolType == "fixed"
+ 0
+ #else
+ "$mzTol.mass_error_function"
+ #end if
$htmlReportFile
$htmlReportFile.files_path
$outputLog
@@ -20,13 +25,31 @@
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,8 +61,11 @@
metaSetting(customMetaMSsettings, "match2DB") <- list(
rtdiff = ${rtdiff},
rtval = ${rtval},
- mzdiff = ${mzdiff},
- ppm = ${match2DB_ppm},
+ #if $mzTol.mzTolType == "fixed"
+ mzdiff = ${mzTol.mzdiff},
+ #else
+ ppm = ${mzTol.ppm},
+ #end if
minfeat = ${minfeat})
@@ -58,27 +84,32 @@
.. class:: infomark
-Runs metaMS process for LC/MS feature annotation.
-The figure below shows the main parts of the metaMS process.
-This tool related to the last step of this process.
+Runs metaMS process for LC/MS feature annotation based on matching to an existing 'standards' DB.
+The figure below shows the main parts of this metaMS process.
-.. image:: $PATH_TO_IMAGES/metaMS.png
+.. image:: $PATH_TO_IMAGES/metaMS_annotate.png
-From CAMERA documentation:
+.. class:: infomark
-.. image:: $PATH_TO_IMAGES/CAMERA_results.png
-
-**References**
+The implemented annotation strategy can be broken down in the following steps:
-If you use this Galaxy tool in work leading to a scientific publication please
-cite the following papers:
+1. *Feature wise Annotation:* Each feature detected by runLC is matched against the database. If
+the mass error function is provided, the appropriate m/z tolerance is calculated, otherwise a fixed
+tolerance is used (mzdiff). The retention time tolerance is fixed and should be selected on the
+bases of the characteristics of each chromatographic method (rtdiff). Multiple annotations - i.e.
+features which are associated to more than one compound - are possible. This outcome does not
+indicate a problem per se, but is an inherent drawback of co-elution.
-Wehrens, R.; Weingart, G.; Mattivi, F. (2014).
-metaMS: an open-source pipeline for GC-MS-based untargeted metabolomics.
-Journal of chromatography B: biomedical sciences and applications, 996 (1): 109-116.
-doi: 10.1016/j.jchromb.2014.02.051
-handle: http://hdl.handle.net/10449/24012
+2. *Annotation Validation:* The annotated features are organized in 'pseudospectra' collecting all
+the experimental features which are assigned to a specific compound. A specific annotation is
+confirmed only if more than minfeat features which differ in retention time less than rtval are
+present in a pseudospectrum. As a general rule rtval should be narrower than rtdiff. The
+latter, indeed, accounts for shifts in retention time between the injection of the standards and the
+metabolomics experiment under investigation. This time can be rather long, considering that the
+standards are not commonly re-analyzed each time. On the other hand, rtval represents the shift
+between the ions of the same compound within the same batch of injections and therefore it has
+only to account for the smaller shifts occurring during peak picking and alignment.
diff -r 5b1adc49700d -r 70574a6381ea metams_lcms_pick_and_group.xml
--- a/metams_lcms_pick_and_group.xml Thu Dec 11 10:26:17 2014 +0100
+++ b/metams_lcms_pick_and_group.xml Thu Dec 11 14:09:27 2014 +0100
@@ -269,10 +269,14 @@
Runs metaMS process for LC/MS feature feature picking, aligning and grouping.
This part of the metaMS process makes use of the XCMS and CAMERA tools and algorithms.
CAMERA is used for automatic deconvolution/annotation of LC/ESI-MS data.
-The figure below shows the main parts of the metaMS process.
+The figure below shows the main parts of the metaMS process wrapped by this tool.
+
+.. image:: $PATH_TO_IMAGES/metaMS_pick_align_camera.png
-.. image:: $PATH_TO_IMAGES/metaMS.png
+From CAMERA documentation:
+
+.. image:: $PATH_TO_IMAGES/CAMERA_results.png
**References**
diff -r 5b1adc49700d -r 70574a6381ea static/images/metaMS_annotate.png
Binary file static/images/metaMS_annotate.png has changed
diff -r 5b1adc49700d -r 70574a6381ea static/images/metaMS_pick_align_camera.png
Binary file static/images/metaMS_pick_align_camera.png has changed