comparison recetox_xmsannotator_advanced.xml @ 0:cfd2e19f00a9 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/recetox-xmsannotator commit 1ab1a1dabfcebe11720de1411927a7438c1b64c1
author recetox
date Mon, 26 Jun 2023 13:55:56 +0000
parents
children 50ac7359ffe7
comparison
equal deleted inserted replaced
-1:000000000000 0:cfd2e19f00a9
1 <tool id="recetox_xmsannotator_advanced" name="recetox-xMSannotator" version="@TOOL_VERSION@+galaxy0">
2
3 <description>annotate peak intensity table including scores and confidence levels</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="creator"/>
8 <xrefs>
9 <xref type="bio.tools">recetox-xmsannotator</xref>
10 </xrefs>
11 <expand macro="requirements" />
12 <command detect_errors="aggressive"><![CDATA[
13 Rscript -e 'source("${__tool_directory__}/utils.R")' -e "n_workers <- \${GALAXY_SLOTS:-1}" -e "source('${wrapper}')"
14 ]]></command>
15
16 <configfiles>
17 <configfile name="wrapper"><![CDATA[
18 metadata_table <- load_table("$metadata_table", "$metadata_table.ext")
19 intensity_table <- load_table("$intensity_table", "$intensity_table.ext")
20 peak_table <- create_peak_table(metadata_table, intensity_table)
21
22 filter_by <- create_filter_by_adducts("$filter_by")
23
24 annotation <- advanced_annotation(
25 peak_table = peak_table,
26 adduct_table = load_table("$adduct_table", "$adduct_table.ext"),
27 adduct_weights = load_table("$adduct_weights", "$adduct_weights.ext"),
28 compound_table = load_table("$compound_table", "$compound_table.ext"),
29 mass_tolerance = 1e-6 * ${mass_tolerance_ppm},
30 time_tolerance = $time_tolerance,
31 correlation_threshold = as.double($clustering.correlation_threshold),
32 min_cluster_size = as.integer($clustering.min_cluster_size),
33 deep_split = as.integer($clustering.deep_split),
34 network_type = "$clustering.network_type",
35 redundancy_filtering = $scoring.redundancy_filtering,
36 n_workers = n_workers,
37 intensity_deviation_tolerance = as.double($intensity_deviation_tolerance),
38 mass_defect_tolerance = as.double($mass_defect_tolerance),
39 mass_defect_precision = as.double($mass_defect_precision),
40 peak_rt_width = as.integer($peak_rt_width),
41 maximum_isotopes = as.integer($maximum_isotopes),
42 min_ions_per_chemical = as.integer($min_ions_per_chemical),
43 filter_by = filter_by
44 )
45
46 save_table(annotation, "$output_file", "$output_file.ext")
47 ]]></configfile>
48 </configfiles>
49
50 <inputs>
51 <expand macro="inputs"/>
52 <expand macro="tolerance">
53 <param name="time_tolerance" type="float" value="10" min="0">
54 <label>Retention time tolerance [s]</label>
55 <help>
56 Retention time tolerance in seconds for finding peaks derived from the same parent compound.
57 </help>
58 </param>
59 </expand>
60 <section name="clustering" title="Clustering">
61 <param name="correlation_threshold" type="float" value="0.7">
62 <label>Correlation threshold</label>
63 <help>Correlation threshold between peaks to qualify as adducts/isotopes of the same metabolite.</help>
64 </param>
65 <param name="min_cluster_size" type="integer" value="10" min="1">
66 <label>Minimum cluster size</label>
67 <help>The minimum number of nodes to be considered as a cluster.</help>
68 </param>
69 <param name="deep_split" type="integer" value="2" min="0" max="4">
70 <label>Deep split</label>
71 <help>
72 Deep split provides a rough control over sensitivity to cluster splitting. The higher the value,
73 the more and smaller clusters will be produced (see WGCNA package documentation).
74 </help>
75 </param>
76 <param name="network_type" type="select" display="radio">
77 <label>Network type</label>
78 <help>
79 Network type parameter affects how the network's adjacency matrix is created from the correlation
80 matrix (see WGCNA package documentation).
81 </help>
82 <option value="signed">Signed</option>
83 <option value="unsigned" selected="true">Unsigned</option>
84 </param>
85 </section>
86 <section name="scoring" title="Scoring" expanded="true">
87 <param name="strict_boosting" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE">
88 <label>Strict boosting</label>
89 <help>
90 Boost the scores of metabolites that not only belongs to the same pathway but also to the same
91 cluster. Otherwise, do not account for cluster membership.
92 </help>
93 </param>
94 <param name="min_isp" type="integer" min="0" value="1">
95 <label>Minimum number of expected isotopes</label>
96 <help>
97 Minimum number of adducts/isotopes to be present for a match to be considered as a high confidence match.
98 </help>
99 </param>
100 <param name="max_isp" type="integer" min="0" value="5">
101 <label>Maximum number of expected isotopes</label>
102 <help>
103 Maximum number of adducts/isotopes to be present for a match to be considered as a high confidence match.
104 </help>
105 </param>
106 <param name="redundancy_filtering" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE">
107 <label>Redundancy filtering</label>
108 <help>Whether to filter out low-scored multiple matcher or not.</help>
109 </param>
110 </section>
111 <param name="intensity_deviation_tolerance" type="float" value="0.1">
112 <label>Tolerance of intensity deviation</label>
113 <help>A numeric threshold by which an intensity ratio of two isotopic peaks may differ from their actual abundance ratio.</help>
114 </param>
115 <param name="mass_defect_tolerance" type="float" value="0.1">
116 <label>Tolerance of mass defect</label>
117 <help>Maximum difference in mass defect between two peaks of the same compound.</help>
118 </param>
119 <param name="mass_defect_precision" type="float" value="0.01">
120 <label>Precision for computing mass defect</label>
121 </param>
122 <param name="peak_rt_width" type="integer" value="1">
123 <label>Estimated chromatographic peak width</label>
124 </param>
125 <param name="maximum_isotopes" type="integer" value="10">
126 <label>Maximum isotopes</label>
127 </param>
128 <param name="min_ions_per_chemical" type="integer" value="2">
129 <label>Minimum ions per chemical</label>
130 </param>
131 <param name="filter_by" type="select" label="Adducts to filter by" multiple="true" optional="true">
132 <option value="M-H" selected="true">M-H</option>
133 <option value="M+H" selected="true">M+H</option>
134 <option value="2M-H">2M-H</option>
135 <option value="M-2H">M-2H</option>
136 </param>
137 </inputs>
138
139 <outputs>
140 <expand macro="outputs"/>
141 </outputs>
142
143 <tests>
144 <test>
145 <param name="metadata_table" value="metadata_table.parquet" ftype="parquet" />
146 <param name="intensity_table" value="intensity_table.parquet" ftype="parquet" />
147 <param name="compound_table" value="database.parquet" ftype="parquet" />
148 <param name="adduct_table" value="adduct_table.parquet" ftype="parquet" />
149 <output name="output_file" file="expected_output.parquet" ftype="parquet"/>
150 </test>
151 <test>
152 <param name="metadata_table" value="metadata_table.csv" ftype="csv" />
153 <param name="intensity_table" value="intensity_table.csv" ftype="csv" />
154 <param name="compound_table" value="database.csv" ftype="csv" />
155 <param name="adduct_table" value="adduct_table.csv" ftype="csv" />
156 <output name="output_file" file="expected_output.csv" ftype="csv"/>
157 </test>
158 </tests>
159
160 <help>
161 <![CDATA[
162 @HELP@
163 ]]>
164 </help>
165
166 <citations>
167 <expand macro="citations"/>
168 </citations>
169 </tool>