annotate macros.xml @ 0:58c95171a0d3 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
author recetox
date Mon, 02 Sep 2024 12:12:18 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
1 <macros>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
2 <token name="@TOOL_VERSION@">2.0.0</token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
3 <token name="@ONNX_VERSION@">1.16.2</token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
4
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
5 <xml name="creator">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
6 <creator>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
7 <person
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
8 givenName="Zargham"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
9 familyName="Ahmad"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
10 url="https://github.com/zargham-ahmad"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
11 identifier="0000-0002-6096-224X" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
12 <organization
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
13 url="https://www.recetox.muni.cz/"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
14 email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
15 name="RECETOX MUNI" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
16 </creator>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
17 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
18
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
19 <xml name="edam">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
20 <xrefs>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
21 <xref type="bio.tools">ms2deepscore</xref>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
22 </xrefs>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
23 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
24
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
25 <xml name="input_param">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
26 <conditional name="scores">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
27 <param name="use_scores" label="Use Scores Object" type="select">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
28 <option value="False" selected="true">FALSE</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
29 <option value="True">TRUE</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
30 </param>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
31 <when value="True">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
32 <param label="Scores object" name="scores_in" type="data" format="json"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
33 help="Scores objects calculated previously using one of the matchms similarity tools." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
34 </when>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
35 <when value="False">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
36 <param label="Queries spectra" name="queries" type="data" format="msp"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
37 help="Query mass spectra to match against references."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
38 <param label="Reference spectra" name="references" type="data" format="msp"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
39 help="Reference mass spectra to match against as library."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
40 </when>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
41 </conditional>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
42 <param name="model" type="data" format="onnx" label="Model"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
43 help="Select the trained MS2DeepScore model file (onnx format) in the ONNX format as created by the 'MS2DeepScore Training' tool."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
44 <param name="model_param" type="data" format="json" label="Configuration"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
45 help="Select the MS2DeepScore model configurations in JSON format. Can be created using the 'MS2DeepScore Config Generator' tool."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
46 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
47
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
48 <xml name="training_param">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
49 <param label="Training Dataset" name="spectra" type="data" format="msp,mgf"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
50 help="Spectra file that should be used for training. (it will be split in training, validation and test sets)."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
51 <param name="model_param" type="data" format="json" label="Model Settings" help="json file with the MS2Deepscore model settings."/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
52 <param name="validation_split_fraction" type="integer" min="0" max="100" value="20" label="Validation split fraction [%]"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
53 help="The fraction of the inchikeys that will be used for validation and test"/>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
54 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
55
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
56 <xml name="config_generator">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
57 <section name="model_structure" title="Model Structure" expanded="true">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
58 <repeat name="layers" title="Layer" min="1" default="1" >
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
59 <param name="dims" type="integer" label="Dimensions" min = "0" value="2000" help="Size of the in-between layer to add." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
60 </repeat>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
61 <param name="embedding_dim" type="integer" label="Embedding Dimension" value="400" help="The dimension of the final embedding layer." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
62 <param name="ionisation_mode" type="select" label="Ionisation Mode">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
63 <option value="positive" selected="true">Positive</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
64 <option value="negative">Negative</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
65 <option value="both">Both</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
66 </param>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
67 </section>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
68
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
69 <section name="tensorization_settings" title="Tensorization Settings" expanded="true">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
70 <param name="min_mz" type="integer" label="Min m/z" value="10" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
71 <param name="max_mz" type="integer" label="Max m/z" value="1000" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
72 <param name="mz_bin_width" type="float" label="m/z Bin Width" value="0.1" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
73 <param name="intensity_scaling" type="float" label="Intensity Scaling" value="0.5" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
74 <param name="fingerprint_type" type="text" value="daylight" label="Fingerprint Type" help="The fingerprint type that should be used for tanimoto score calculations." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
75 <param name="fingerprint_nbits" type="integer" label="Fingerprint Number of Bits" value="2048" help="The number of bits to use for the fingerprint." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
76 </section>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
77
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
78
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
79 <section name="training_settings" title="Training Settings" expanded="false">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
80 <param name="dropout_rate" type="float" label="Dropout Rate" value="0.0" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
81 <param name="learning_rate" type="float" label="Learning Rate" value="0.00025" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
82 <param name="epochs" type="integer" label="Epochs" value="250" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
83 <param name="patience" type="integer" label="Patience" value="20" help="How long the model should keep training if validation does not improve" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
84 <param name="loss_function" type="select" label="Loss Function">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
85 <option value="mse" selected="true">Mean Squared Error (mse)</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
86 <option value="mae">Mean Absolute Error (mae)</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
87 <option value="rmse">Root Mean Squared Error (rmse)</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
88 <option value="risk_mae">Risk Aware MAE (risk_aware_mae)</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
89 <option value="risk_mse">Risk Aware MSE (risk_aware_mse)</option>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
90 </param>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
91 <param name="weighting_factor" type="integer" label="Weighting Factor" value="0" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
92 <param name="batch_size" type="integer" value="32" label="Batch Size" help="Number of pairs per batch" />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
93 <param name="average_pairs_per_bin" type="integer" value="20" label="Average pairs per bin" help="The aimed average number of pairs of spectra per spectrum in each bin." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
94 <param name="random_seed" type="text" label="Random seed" value="None" help="Specify random seed for reproducible random number generation." />
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
95 </section>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
96 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
97
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
98 <xml name="citations">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
99 <citations>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
100 <citation type="doi">https://doi.org/10.1186/s13321-021-00558-4</citation>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
101 <citation type="doi">https://doi.org/10.1101/2024.03.25.586580</citation>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
102 </citations>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
103 </xml>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
104
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
105
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
106 <token name="@HELP@">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
107 ms2deepscore provides a Siamese neural network that is trained to predict molecular structural similarities (Tanimoto scores) from pairs of mass spectrometry spectra.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
108 The library provides an intuitive classes to prepare data, train a siamese model, and compute similarities between pairs of spectra.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
109 In addition to the prediction of a structural similarity, MS2DeepScore can also make use of Monte-Carlo dropout to assess the model uncertainty.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
110 MS2DeepScore is able to identify highly-reliable structural matches and to predict Tanimoto scores for pairs of molecules based on their fragment spectra with a root mean squared error of about 0.15.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
111 Furthermore, the prediction uncertainty estimate can be used to select a subset of predictions with a root mean squared error of about 0.1.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
112 MS2DeepScore can also be used to create chemically meaningful mass spectral embeddings that could be used to cluster large numbers of spectra.
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
113 </token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
114
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
115
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
116 <token name="@init_scores@">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
117 from matchms.importing import load_from_msp, scores_from_json
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
118 from matchms import Scores
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
119 #if $scores.use_scores == "True"
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
120 scores = scores_from_json("${scores_in}")
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
121 #else
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
122 scores = Scores(references=list(load_from_msp("$references")), queries=list(load_from_msp("$queries")), is_symmetric=False)
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
123 #end if
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
124 </token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
125
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
126 <token name="@init_logger@">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
127 from matchms import set_matchms_logger_level
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
128 set_matchms_logger_level("WARNING")
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
129 </token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
130
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
131 <token name="@json_load@">
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
132 import numpy as np
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
133 import json
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
134
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
135 with open("$model_param", 'r') as json_file:
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
136 model_params = json.load(json_file)
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
137
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
138 # Conditionally convert specific keys if they are present
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
139 if 'base_dims' in model_params:
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
140 model_params['base_dims'] = tuple(model_params['base_dims'])
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
141
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
142 if 'same_prob_bins' in model_params:
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
143 model_params['same_prob_bins'] = np.array(model_params['same_prob_bins'])
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
144
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
145 if 'additional_metadata' in model_params:
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
146 model_params['additional_metadata'] = [
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
147 (entry[0], entry[1]) for entry in model_params['additional_metadata']
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
148 ]
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
149 </token>
58c95171a0d3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ms2deepscore commit 4bd610e0cbbcbed51a6bfb880179777fc8034fd6
recetox
parents:
diff changeset
150 </macros>