comparison xmsannotator_advanced.xml @ 3:3bdef6d114fd draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/xmsannotator commit de75adf885d616bbe94c8087d3208a2b5039418e"
author recetox
date Thu, 08 Oct 2020 00:41:36 +0000
parents 477d579f475b
children 6b2b2b83b46c
comparison
equal deleted inserted replaced
2:f8b5c1c9661e 3:3bdef6d114fd
1 <tool id="xmsannotator_advanced" name="xMSannotator (advanced)" version="@TOOL_VERSION@+galaxy0"> 1 <tool id="xmsannotator_advanced" name="xMSannotator (advanced)" version="@TOOL_VERSION@+galaxy0">
2 <macros> 2 <macros>
3 <import>xmsannotator_macros.xml</import> 3 <import>xmsannotator_macros.xml</import>
4 </macros> 4 </macros>
5 5
6 <expand macro="requirements"/> 6 <requirements>
7 <container type="docker">@DOCKER_IMAGE@</container>
8 </requirements>
7 9
8 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="aggressive"><![CDATA[
9 #set expected_adducts = ['"{}"'.format($i.adduct) for $i in $scoring.expected_adducts] 11 #set expected_adducts = ['"{}"'.format($i.adduct) for $i in $scoring.expected_adducts]
10 #set expected_adducts = "c(" + ', '.join($expected_adducts) + ")" 12 #set expected_adducts = "c(" + ', '.join($expected_adducts) + ")"
11 13
12 Rscript -e 'annotation <- xmsannotator::advanced_annotation( 14 Rscript -e 'annotation <- xmsannotator::advanced_annotation(
13 peaks = rhdf5::h5read("$peaks", "peaks"), 15 peaks = xmsannotator::load_hdf("$peaks", "peaks"),
14 adducts = rhdf5::h5read("$adducts", "adducts"), 16 adducts = xmsannotator::load_hdf("$adducts", "adducts"),
15 metabolites = rhdf5::h5read("$metabolites", "metabolites"), 17 compounds = xmsannotator::load_hdf("$compounds", "compounds"),
16 18
17 mz_tolerance_ppm = as.double($mz_tolerance_ppm), 19 mass_tolerance = 1e-6 * $mz_tolerance_ppm
18 rt_tolerance = as.double($rt_tolerance), 20 time_tolerance = $rt_tolerance,
19 21
20 correlation_threshold = as.double($clustering.correlation_threshold), 22 correlation_threshold = as.double($clustering.correlation_threshold),
21 min_cluster_size = as.integer($clustering.min_cluster_size), 23 min_cluster_size = as.integer($clustering.min_cluster_size),
22 deep_split = as.integer($clustering.deep_split), 24 deep_split = as.integer($clustering.deep_split),
23 network_type = "$clustering.network_type", 25 network_type = "$clustering.network_type",
24 26
25 #if $scoring.boost_metabolites 27 expected_adducts = as.character($expected_adducts),
26 boost_metabolites = rhdf5::h5read("$scoring.boost_metabolites", "boost_metabolites"), 28 #if $scoring.boost
29 boost = xmsannotator::load_hdf("$scoring.boost", "boost"),
27 #end if 30 #end if
28 31 redundancy_filtering = $scoring.redundancy_filtering
29 expected_adducts = as.character($expected_adducts)
30 )' 32 )'
31 -e 'rhdf5::h5write(annotation, "$annotation", "annotation")' 33 -e 'xmsannotator::save_hdf("$annotation", "annotation", annotation)'
32 ]]></command> 34 ]]></command>
33 35
34 <inputs> 36 <inputs>
35 <expand macro="annotation"/> 37 <expand macro="annotation"/>
36 <param name="rt_tolerance" type="float" value="10" min="0" label="Retention time tolerance [s]" help="Retention time tolerance in seconds for finding peaks derived from the same parent metabolite."/> 38 <param name="rt_tolerance" type="float" value="10" min="0" label="Retention time tolerance [s]" help="Retention time tolerance in seconds for finding peaks derived from the same parent metabolite."/>
48 <option value="unsigned" selected="true"/> 50 <option value="unsigned" selected="true"/>
49 </param> 51 </param>
50 </section> 52 </section>
51 53
52 <section name="scoring" title="Scoring" expanded="true"> 54 <section name="scoring" title="Scoring" expanded="true">
53 <param name="boost_metabolites" type="data" format="h5" optional="true" label="Validated metabolites score boosting (optional)" help="Table of previously validated metabolites to boost their confidence scores. The 1st column of the table must contain IDs of metabolites. The optional 2nd and 3rd columns may contain mz values and retention times."/> 55 <param name="strict_boosting" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Strict boosting" help="Boost the scores of metabolites that not only belongs to the same pathway but also to the same cluster. Otherwise, do not account for cluster membership."/>
54 <repeat name="expected_adducts" title="Expected adducts" help="Require the presence of certain adducts for a high confidence match."> 56 <repeat name="expected_adducts" title="Expected adducts" help="Require the presence of certain adducts for a high confidence match.">
55 <param name="adduct" type="text" value="M+H" label="Adduct"/> 57 <param name="adduct" type="text" value="M+H" label="Adduct"/>
56 </repeat> 58 </repeat>
59 <param name="boost" type="data" format="h5" optional="true" label="Validated compounds score boosting (optional)" help="Table of previously validated compounds to boost their scores and confidence levels. The 1st column of the table must contain IDs of compounds. The optional 2nd and 3rd columns may contain mz values and retention times."/>
57 <param name="min_isp" type="integer" min="0" value="1" label="Minimum number of expected isotopes" help="Minimum number of adducts/isotopes to be present for a match to be considered as a high confidence match."/> 60 <param name="min_isp" type="integer" min="0" value="1" label="Minimum number of expected isotopes" help="Minimum number of adducts/isotopes to be present for a match to be considered as a high confidence match."/>
58 <param name="max_isp" type="integer" min="0" value="5" label="Maximum number of expected isotopes" help="Maximum number of adducts/isotopes to be present for a match to be considered as a high confidence match."/> 61 <param name="max_isp" type="integer" min="0" value="5" label="Maximum number of expected isotopes" help="Maximum number of adducts/isotopes to be present for a match to be considered as a high confidence match."/>
59 <param name="strict_boosting" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Strict boosting" help="Boost the scores of metabolites that not only belongs to the same pathway but also to the same cluster. Otherwise, do not account for cluster membership."/> 62 <param name="redundancy_filtering" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Redundancy filtering" help="Whether to filter out low-scored multiple matcher or not."/>
60 <param name="redundancy_filtering" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Redundancy filtering" help="Whether to perform final redundancy filtering or not."/>
61 </section> 63 </section>
62 </inputs> 64 </inputs>
63 65
64 <outputs> 66 <outputs>
65 <expand macro="output"/> 67 <data format="h5" name="annotation"/>
66 </outputs> 68 </outputs>
67 69
68 <help><![CDATA[ 70 <help><![CDATA[
69 Annotate the peak intensity table (such as outputted from apLCMS) with metabolites from the metabolite database using advanced methods. 71 Annotate the peak intensity table (such as outputted from apLCMS) with metabolites from the metabolite database using advanced methods.
70 72
71 The annotation process generates all possible metabolite-adduct pairs from the metabolite and adduct databases and matches those pairs to the measured peaks. 73 The annotation process generates all possible metabolite-adduct pairs from the metabolite and adduct databases and matches those pairs to the measured peaks.
72 A metabolite-adduct pair is pronounced as a match to the peak when the difference of their masses are withing some tolerance. 74 A metabolite-adduct pair is pronounced as a match to the peak when the difference of their masses are withing some tolerance.
73 Then a score and a confidence level is assigned to each match based on peak correlation clustering, metabolite pathway associations, adducts expectations, and isotope conformations. 75 Then a score and a confidence level is assigned to each match based on peak correlation clustering, metabolite pathway associations, adducts expectations, and isotope conformations.
74 ]]></help> 76 ]]></help>
77
75 <expand macro="citations"/> 78 <expand macro="citations"/>
76 </tool> 79 </tool>