comparison xmsannotator_simple.xml @ 3:412d8bb4b54d draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/xmsannotator commit 339f3b1b1243f353dd3ed115ac66320fdd2d2b68"
author recetox
date Mon, 14 Dec 2020 03:33:21 +0000
parents 041052875af0
children cd0729b7c3dc
comparison
equal deleted inserted replaced
2:041052875af0 3:412d8bb4b54d
1 <tool id="xmsannotator_simple" name="xMSannotator (simple)" version="@TOOL_VERSION@+galaxy0"> 1 <tool id="xmsannotator_simple" name="xMSannotator (simple)" version="@TOOL_VERSION@+galaxy2">
2 <macros> 2 <macros>
3 <import>xmsannotator_macros.xml</import> 3 <import>xmsannotator_macros.xml</import>
4 </macros> 4 </macros>
5 5
6 <requirements> 6 <requirements>
7 <container type="docker">@DOCKER_IMAGE@</container> 7 <container type="docker">@DOCKER_IMAGE@</container>
8 </requirements> 8 </requirements>
9 9
10 <command detect_errors="aggressive"><![CDATA[ 10 <command detect_errors="aggressive"><![CDATA[
11 Rscript -e 'annotation <- xmsannotator::simple_annotation( 11 Rscript $wrapper
12 peaks = xmsannotator::load_hdf("$peaks", "peaks"),
13 adducts = xmsannotator::load_hdf("$adducts", "adducts"),
14 compounds = xmsannotator::load_hdf("$compounds", "compounds"),
15 mass_tolerance = 1e-6 * $mz_tolerance_ppm
16 )'
17 -e 'xmsannotator::save_hdf("$annotation", "annotation", annotation)'
18 ]]></command> 12 ]]></command>
19 13
14 <configfiles>
15 <configfile name="wrapper"><![CDATA[
16 library(xmsannotator)
17
18 annotation <- simple_annotation(
19 #if $peak_table.is_of_type("h5")
20 peak_table = load_peak_table_hdf("${peak_table}"),
21 #elif $peak_table.is_of_type("parquet")
22 peak_table = load_peak_table_parquet("${peak_table}"),
23 #end if
24 adduct_table = load_adduct_table_parquet("${adduct_table}"),
25 compound_table = load_compound_table_parquet("${compound_table}"),
26 mass_tolerance = 1e-6 * ${mass_tolerance_ppm}
27 )
28
29 save_parquet(data = annotation, file = "${annotation_parquet}")
30 ]]></configfile>
31 </configfiles>
32
20 <inputs> 33 <inputs>
21 <expand macro="annotation"/> 34 <expand macro="inputs"/>
35 <expand macro="tolerance"/>
22 </inputs> 36 </inputs>
23 37
24 <outputs> 38 <outputs>
25 <data format="h5" name="annotation"/> 39 <expand macro="outputs"/>
26 </outputs> 40 </outputs>
27 41
28 <help><![CDATA[ 42 <help><![CDATA[
29 Annotate the peak intensity table (such as outputted from apLCMS) with metabolites from the metabolite database. 43 Annotate the peak intensity table (such as outputted from apLCMS) with compounds from the compounds database.
30 44
31 The annotation process generates all possible metabolite-adduct pairs from the metabolite and adduct databases and matches those pairs to the measured peaks. 45 The annotation process generates all possible compound-adduct pairs and matches those pairs to the measured
32 A metabolite-adduct pair is pronounced as a match to the peak when the difference of their masses are withing some tolerance. 46 peaks. A compound-adduct pair is pronounced as a match to a certain peak when the difference of their masses are
47 withing some tolerance.
33 ]]></help> 48 ]]></help>
34 49
35 <expand macro="citations"/> 50 <citations>
51 <expand macro="citations"/>
52 </citations>
36 </tool> 53 </tool>