changeset 0:97d1619ff23e draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/xmsannotator commit 9c62378416ff3634935e7da4aa97b05d3356d1b5"
author recetox
date Wed, 23 Sep 2020 13:31:39 +0000
parents
children 02a38a19405d
files xmsannotator_macros.xml xmsannotator_simple.xml
diffstat 2 files changed, 59 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmsannotator_macros.xml	Wed Sep 23 13:31:39 2020 +0000
@@ -0,0 +1,27 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.3.2</token>
+    <xml name="requirements">
+        <requirements>
+            <container type="docker">recetox/xmsannotator:latest</container>
+        </requirements>
+    </xml>
+
+    <xml name="annotation">
+        <param name="peaks" type="data" format="h5" label="Peaks" help="Table of peaks to annotate."/>
+        <param name="metabolites" type="data" format="h5" label="Metabolite database"/>
+        <param name="adducts" type="data" format="h5" label="Adduct database"/>
+
+
+        <param name="mz_tolerance_ppm" type="float" value="5" min="0" label="Mass tolerance [ppm]" help="Mass tolerance in ppm for database matching."/>
+    </xml>
+
+    <xml name="output">
+        <data format="h5" name="annotation"/>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1021/acs.analchem.6b01214</citation>
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmsannotator_simple.xml	Wed Sep 23 13:31:39 2020 +0000
@@ -0,0 +1,32 @@
+<tool id="xmsannotator_simple" name="xMSannotator (simple)" version="@TOOL_VERSION@+galaxy0">
+    <macros>
+        <import>xmsannotator_macros.xml</import>
+    </macros>
+
+    <expand macro="requirements"/>
+
+    <command detect_errors="aggressive"><![CDATA[
+        Rscript -e 'annotation <- xmsannotator::simple_annotation(
+                        peaks = rhdf5::h5read("$peaks", "peaks"),
+                        adducts = rhdf5::h5read("$adducts", "adducts"),
+                        metabolites = rhdf5::h5read("$metabolites", "metabolites"),
+                        mz_tolerance_ppm = as.double($mz_tolerance_ppm)
+                   )'
+                -e 'rhdf5::h5write(annotation, "$annotation", "annotation")'
+    ]]></command>
+
+    <inputs>
+        <expand macro="annotation"/>
+    </inputs>
+    <outputs>
+        <expand macro="output"/>
+    </outputs>
+
+    <help><![CDATA[
+        Annotate the peak intensity table (such as outputted from apLCMS) with metabolites from the metabolite database.
+
+        The annotation process generates all possible metabolite-adduct pairs from the metabolite and adduct databases and matches those pairs to the measured peaks.
+        A metabolite-adduct pair is pronounced as a match to the peak when the difference of their masses are withing some tolerance.
+    ]]></help>
+    <expand macro="citations"/>
+</tool>