Mercurial > repos > recetox > matchms
comparison matchms_similarity.xml @ 0:30e680e555d4 draft
"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 4d2ac914c951166e386a94d8ebb8cb1becfac122"
author | recetox |
---|---|
date | Tue, 22 Mar 2022 16:07:32 +0000 |
parents | |
children | f680068b7863 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:30e680e555d4 |
---|---|
1 <tool id="matchms" name="matchMS similarity" version="@TOOL_VERSION@+galaxy1" python_template_version="3.8"> | |
2 <description>calculate the similarity score and matched peaks</description> | |
3 | |
4 <macros> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="creator"/> | |
8 | |
9 <requirements> | |
10 <requirement type="package" version="1.1.4">pandas</requirement> | |
11 <requirement type="package" version="0.55.1">numba</requirement> | |
12 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> | |
13 </requirements> | |
14 | |
15 <environment_variables> | |
16 <environment_variable name="MPLCONFIGDIR">/tmp</environment_variable> | |
17 </environment_variables> | |
18 | |
19 <command detect_errors="exit_code"><![CDATA[ | |
20 sh ${matchms_python_cli} | |
21 ]]> </command> | |
22 | |
23 <configfiles> | |
24 <configfile name="matchms_python_cli"> | |
25 python3 ${__tool_directory__}/matchms_similarity_wrapper.py \ | |
26 #if $ri_filtering.is_true | |
27 -r $ri_filtering.tolerance \ | |
28 #end if | |
29 #if $symmetric.is_symmetric | |
30 -s \ | |
31 #else | |
32 --ref "$references" \ | |
33 --ref_format "$references.ext" \ | |
34 #end if | |
35 "$queries" \ | |
36 "$queries.ext" \ | |
37 "$similarity_metric" \ | |
38 "$algorithm.tolerance" \ | |
39 "$algorithm.mz_power" \ | |
40 "$algorithm.intensity_power" \ | |
41 "$similarity_scores" \ | |
42 "$similarity_matches" | |
43 </configfile> | |
44 </configfiles> | |
45 | |
46 <inputs> | |
47 <param label="Queries spectra" name="queries" type="data" format="msp,mgf" | |
48 help="Query mass spectra to match against references."/> | |
49 <conditional name="symmetric"> | |
50 <param name="is_symmetric" label="Symmetric" type="boolean" truevalue="TRUE" falsevalue="FALSE" | |
51 checked="false"/> | |
52 <when value="FALSE"> | |
53 <param label="Reference spectra" name="references" type="data" format="msp,mgf" | |
54 help="Reference mass spectra to match against as library."/> | |
55 </when> | |
56 </conditional> | |
57 <param label="Similarity metric" name="similarity_metric" type="select" display="radio" | |
58 help="Similarity metric to use for score computation."> | |
59 <option value="CosineGreedy" selected="true">CosineGreedy</option> | |
60 <option value="CosineHungarian">CosineHungarian</option> | |
61 <option value="ModifiedCosine">ModifiedCosine</option> | |
62 </param> | |
63 | |
64 <section name="algorithm" title="Algorithm Parameters" expanded="true"> | |
65 <param label="tolerance" name="tolerance" type="float" value="0.1" | |
66 help="Peaks will be considered a match when less than tolerance apart. Absolute m/z value, not in ppm."/> | |
67 <param label="mz_power" name="mz_power" type="float" value="0.0" | |
68 help="The power to raise mz to in the cosine function."/> | |
69 <param label="intensity_power" name="intensity_power" type="float" value="1.0" | |
70 help="The power to raise intensity to in the cosine function."/> | |
71 </section> | |
72 | |
73 <conditional name="ri_filtering"> | |
74 <param name="is_true" label="Apply RI filtering" type="boolean" truevalue="TRUE" falsevalue="FALSE" | |
75 checked="false"/> | |
76 <when value="TRUE"> | |
77 <param label="tolerance" name="tolerance" type="float" value="60" | |
78 help="Peaks will be considered a match when less than tolerance apart."/> | |
79 </when> | |
80 </conditional> | |
81 </inputs> | |
82 | |
83 <outputs> | |
84 <data label="$similarity_metric scores of ${on_string}" name="similarity_scores" format="tsv"/> | |
85 <data label="$similarity_metric matches of ${on_string}" name="similarity_matches" format="tsv"/> | |
86 </outputs> | |
87 | |
88 <tests> | |
89 <test> | |
90 <param name="references" value="similarity/fill.mgf" ftype="mgf"/> | |
91 <param name="queries" value="similarity/fill.msp" ftype="msp"/> | |
92 <param name="similarity_metric" value="CosineGreedy"/> | |
93 <output name="similarity_scores" file="similarity/scores_test1_out.tsv" ftype="tsv" | |
94 checksum="md5$1aff8d0777e2f4e565be2b1b393547ef"/> | |
95 <output name="similarity_matches" file="similarity/matches_test1_out.tsv" ftype="tsv" | |
96 checksum="md5$aab26ef4a0e80a53699832db72c06340"/> | |
97 </test> | |
98 <test> | |
99 <param name="references" value="similarity/recetox_gc-ei_ms_20201028.msp" ftype="msp"/> | |
100 <param name="queries" value="similarity/fill.msp" ftype="msp"/> | |
101 <param name="similarity_metric" value="CosineGreedy"/> | |
102 <output name="similarity_scores" file="scores_test2_out.tsv" ftype="tsv" | |
103 checksum="md5$d2a5a01d9980636ce6a246d68834b84e"/> | |
104 <output name="similarity_matches" file="matches_test2_out.tsv" ftype="tsv" | |
105 checksum="md5$28dc16ce45105234437e53d59e240046"/> | |
106 </test> | |
107 <test> | |
108 <param name="references" value="similarity/recetox_gc-ei_ms_20201028.msp" ftype="msp"/> | |
109 <param name="queries" value="similarity/fill.msp" ftype="msp"/> | |
110 <param name="similarity_metric" value="CosineHungarian"/> | |
111 <output name="similarity_scores" file="similarity/scores_test3_out.tsv" ftype="tsv" | |
112 checksum="md5$1341369778036e0a267ff723f8cfca9c"/> | |
113 <output name="similarity_matches" file="similarity/matches_test3_out.tsv" ftype="tsv" | |
114 checksum="md5$28dc16ce45105234437e53d59e240046"/> | |
115 </test> | |
116 <test> | |
117 <param name="references" value="similarity/recetox_gc-ei_ms_20201028.msp" ftype="msp"/> | |
118 <param name="queries" value="similarity/recetox_gc-ei_ms_20201028.msp" ftype="msp"/> | |
119 <param name="similarity_metric" value="ModifiedCosine"/> | |
120 <output name="similarity_scores" file="similarity/scores_test4_out.tsv" ftype="tsv"/> | |
121 <output name="similarity_matches" file="similarity/matches_test4_out.tsv" ftype="tsv"/> | |
122 </test> | |
123 <test> | |
124 <param name="queries" value="similarity/fill.msp" ftype="msp"/> | |
125 <param name="similarity_metric" value="CosineHungarian"/> | |
126 <param name="is_symmetric" value="TRUE"/> | |
127 <output name="similarity_scores" file="similarity/scores_test5_out.tsv" ftype="tsv"/> | |
128 <output name="similarity_matches" file="similarity/matches_test5_out.tsv" ftype="tsv"/> | |
129 </test> | |
130 <test> | |
131 <param name="references" value="similarity/recetox_gc-ei_ms_20201028.msp" ftype="msp"/> | |
132 <param name="queries" value="similarity/fill2.msp" ftype="msp"/> | |
133 <param name="ri_filtering.is_true" value="TRUE" /> | |
134 <param name="ri_filtering.tolerance" value="60.0" /> | |
135 <param name="similarity_metric" value="CosineGreedy"/> | |
136 <output name="similarity_scores" file="similarity/scores_test6_out.tsv" ftype="tsv"/> | |
137 <output name="similarity_matches" file="similarity/matches_test6_out.tsv" ftype="tsv"/> | |
138 </test> | |
139 </tests> | |
140 | |
141 <help> | |
142 <![CDATA[ | |
143 @HELP_matchms@ | |
144 ]]> | |
145 </help> | |
146 | |
147 <citations> | |
148 <citation type="doi">10.5281/zenodo.4589154</citation> | |
149 <citation type="doi">10.21105/joss.02411</citation> | |
150 </citations> | |
151 </tool> |