Mercurial > repos > recetox > matchms_similarity
comparison matchms_similarity.xml @ 1:872d8040f713 draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
author | recetox |
---|---|
date | Thu, 12 Oct 2023 13:25:30 +0000 |
parents | e5010b19d64d |
children |
comparison
equal
deleted
inserted
replaced
0:e5010b19d64d | 1:872d8040f713 |
---|---|
1 <tool id="matchms_similarity" name="matchms similarity" version="@TOOL_VERSION@+galaxy0" profile="21.09"> | 1 <tool id="matchms_similarity" name="matchms similarity" version="@TOOL_VERSION@+galaxy2" profile="21.09"> |
2 <description>calculate the similarity score and matched peaks</description> | 2 <description>calculate the similarity score and matched peaks</description> |
3 | 3 |
4 <macros> | 4 <macros> |
5 <import>macros.xml</import> | 5 <import>macros.xml</import> |
6 <import>help.xml</import> | 6 <import>help.xml</import> |
11 <requirements> | 11 <requirements> |
12 <requirement type="package" version="0.8.0">spec2vec</requirement> | 12 <requirement type="package" version="0.8.0">spec2vec</requirement> |
13 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> | 13 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> |
14 </requirements> | 14 </requirements> |
15 | 15 |
16 <command detect_errors="exit_code"><![CDATA[ | |
17 sh ${matchms_python_cli} | |
18 ]]> </command> | |
19 | |
16 <environment_variables> | 20 <environment_variables> |
17 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable> | 21 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable> |
18 </environment_variables> | 22 </environment_variables> |
19 | 23 |
20 <command detect_errors="exit_code"><![CDATA[ | |
21 sh ${matchms_python_cli} | |
22 ]]> </command> | |
23 | |
24 <configfiles> | 24 <configfiles> |
25 <configfile name="matchms_python_cli"> | 25 <configfile name="matchms_python_cli"> |
26 python3 ${__tool_directory__}/matchms_similarity_wrapper.py \ | 26 python3 ${__tool_directory__}/matchms_similarity_wrapper.py \ |
27 #if $ri_filtering.is_true | 27 #if $ri_filtering.is_true == "TRUE" |
28 -r $ri_filtering.tolerance \ | 28 -r $ri_filtering.tolerance \ |
29 #end if | 29 #end if |
30 #if $symmetric.is_symmetric | 30 #if $symmetric.is_symmetric == "TRUE" |
31 -s \ | 31 -s \ |
32 #else | 32 #else |
33 --ref "$references" \ | 33 --ref "$references" \ |
34 --ref_format "$references.ext" \ | 34 --ref_format "$references.ext" \ |
35 #end if | 35 #end if |
56 | 56 |
57 <inputs> | 57 <inputs> |
58 <param label="Queries spectra" name="queries" type="data" format="msp,mgf" | 58 <param label="Queries spectra" name="queries" type="data" format="msp,mgf" |
59 help="Query mass spectra to match against references."/> | 59 help="Query mass spectra to match against references."/> |
60 <conditional name="symmetric"> | 60 <conditional name="symmetric"> |
61 <param name="is_symmetric" label="Symmetric" type="boolean" truevalue="TRUE" falsevalue="FALSE" | 61 <param name="is_symmetric" label="Symmetric" type="select"> |
62 checked="false"/> | 62 <option value="FALSE" selected="true">FALSE</option> |
63 <option value="TRUE">TRUE</option> | |
64 </param> | |
63 <when value="FALSE"> | 65 <when value="FALSE"> |
64 <param label="Reference spectra" name="references" type="data" format="msp,mgf" | 66 <param label="Reference spectra" name="references" type="data" format="msp,mgf" |
65 help="Reference mass spectra to match against as library."/> | 67 help="Reference mass spectra to match against as library."/> |
66 </when> | 68 </when> |
69 <when value="TRUE"></when> | |
67 </conditional> | 70 </conditional> |
68 <param label="Scores array type" name="array_type" type="select" display="radio" | 71 <param label="Scores array type" name="array_type" type="select" display="radio" |
69 help="Matrix type for storing scores objects. Sparse type more memory-efficient and better for large arrays. | 72 help="Matrix type for storing scores objects. Sparse type more memory-efficient and better for large arrays. |
70 Note that whatever is selected the output might still be sprase array if scores have too much 0-entries."> | 73 Note that whatever is selected the output might still be sprase array if scores have too much 0-entries."> |
71 <option value="numpy" selected="true">dense</option> | 74 <option value="numpy" selected="true">dense</option> |
105 </when> | 108 </when> |
106 </conditional> | 109 </conditional> |
107 | 110 |
108 | 111 |
109 <conditional name="ri_filtering"> | 112 <conditional name="ri_filtering"> |
110 <param name="is_true" label="Apply RI filtering" type="boolean" truevalue="TRUE" falsevalue="FALSE" | 113 <param name="is_true" label="Apply RI filtering" type="select"> |
111 checked="false"/> | 114 <option value="FALSE" selected="true">FALSE</option> |
115 <option value="TRUE">TRUE</option> | |
116 </param> | |
112 <when value="TRUE"> | 117 <when value="TRUE"> |
113 <param label="tolerance" name="tolerance" type="float" value="60" | 118 <param label="tolerance" name="tolerance" type="float" value="60" |
114 help="Peaks will be considered a match when less than tolerance apart."/> | 119 help="Peaks will be considered a match when less than tolerance apart."/> |
115 </when> | 120 </when> |
121 <when value="FALSE"></when> | |
116 </conditional> | 122 </conditional> |
117 </inputs> | 123 </inputs> |
118 | 124 |
119 <outputs> | 125 <outputs> |
120 <data label="$metric.similarity_metric scores of ${on_string}" name="similarity_scores" format="json"/> | 126 <data label="$metric.similarity_metric scores of ${on_string}" name="similarity_scores" format="json"/> |
139 </test> | 145 </test> |
140 <test> <!-- TEST #3: Test scoring with applying RI filtering --> | 146 <test> <!-- TEST #3: Test scoring with applying RI filtering --> |
141 <param name="references" value="similarity/fill.mgf" ftype="mgf"/> | 147 <param name="references" value="similarity/fill.mgf" ftype="mgf"/> |
142 <param name="queries" value="similarity/fill2.msp" ftype="msp"/> | 148 <param name="queries" value="similarity/fill2.msp" ftype="msp"/> |
143 <conditional name="ri_filtering"> | 149 <conditional name="ri_filtering"> |
144 <param name="is_true" value="True"></param> | 150 <param name="is_true" value="TRUE"></param> |
145 <param name="tolerance" value="60.0" /> | 151 <param name="tolerance" value="60.0" /> |
146 </conditional> | 152 </conditional> |
147 <conditional name="metric"> | 153 <conditional name="metric"> |
148 <param name="similarity_metric" value="CosineHungarian"/> | 154 <param name="similarity_metric" value="CosineHungarian"/> |
149 </conditional> | 155 </conditional> |
162 <conditional name="metric"> | 168 <conditional name="metric"> |
163 <param name="similarity_metric" value="ModifiedCosine"/> | 169 <param name="similarity_metric" value="ModifiedCosine"/> |
164 </conditional> | 170 </conditional> |
165 <param name="is_symmetric" value="TRUE" /> | 171 <param name="is_symmetric" value="TRUE" /> |
166 <conditional name="ri_filtering"> | 172 <conditional name="ri_filtering"> |
167 <param name="is_true" value="True"></param> | 173 <param name="is_true" value="TRUE"></param> |
168 <param name="tolerance" value="60.0" /> | 174 <param name="tolerance" value="60.0" /> |
169 </conditional> | 175 </conditional> |
170 <output name="similarity_scores" file="similarity/scores_test5_out.json" ftype="json"/> | 176 <output name="similarity_scores" file="similarity/scores_test5_out.json" ftype="json"/> |
171 </test> | 177 </test> |
172 <test> <!-- TEST #6: Test Spec2Vec. --> | 178 <test> <!-- TEST #6: Test Spec2Vec. --> |
176 <param name="similarity_metric" value="Spec2Vec"/> | 182 <param name="similarity_metric" value="Spec2Vec"/> |
177 <param name="model_metadata" value="similarity/spec2vec/model.json" ftype="json"/> | 183 <param name="model_metadata" value="similarity/spec2vec/model.json" ftype="json"/> |
178 <param name="model_weights" value="similarity/spec2vec/weights_100.binary" ftype="auto"/> | 184 <param name="model_weights" value="similarity/spec2vec/weights_100.binary" ftype="auto"/> |
179 <param name="allow_missing_percentage" value="1.0"/> | 185 <param name="allow_missing_percentage" value="1.0"/> |
180 </conditional> | 186 </conditional> |
181 <output name="similarity_scores" file="similarity/scores_test6_out.json" ftype="json" compare="sim_size" delta="100000"/> | 187 <output name="similarity_scores" file="similarity/scores_test6_out.json" ftype="json" compare="sim_size" delta="1000"/> |
182 </test> | 188 </test> |
183 </tests> | 189 </tests> |
184 | 190 |
185 <help> | 191 <help> |
186 @HELP_matchms@ | 192 @HELP_matchms@ |