annotate matchms_convert.xml @ 0:f0ad1b8685fd draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
author recetox
date Tue, 02 May 2023 10:15:50 +0000
parents
children 49ef4455b0c2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
1 <tool id="matchms_convert" name="matchms convert" version="@TOOL_VERSION@+galaxy0" profile="21.05">
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
2 <description>convert between mass spectral library formats using matchms</description>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
3 <macros>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
4 <import>macros.xml</import>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
5 </macros>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
6 <expand macro="creator"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
7 <requirements>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
8 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
9 </requirements>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
10
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
11 <command detect_errors='aggressive'><![CDATA[
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
12 python ${matchms_python_cli}
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
13 ]]></command>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
14
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
15 <configfiles>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
16 <configfile name="matchms_python_cli">
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
17 from matchms.importing import load_from_msp, load_from_mgf, load_from_json
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
18 from matchms.exporting import save_as_msp, save_as_mgf, save_as_json
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
19 spectra = list(load_from_${spectral_library.ext}("${spectral_library}", False))
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
20 #if $output_format == "msp"
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
21 save_as_msp(spectra, "${converted_library}", write_peak_comments = False)
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
22 #else
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
23 save_as_${output_format}(spectra, "${converted_library}")
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
24 #end if
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
25 </configfile>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
26 </configfiles>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
27
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
28 <inputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
29 <param label="Spectra file" name="spectral_library" type="data" format="msp,mgf,json" help="Mass spectral library file to convert." />
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
30
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
31 <param label="Spectral library format" name="output_format" type="select"
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
32 help="Output format to convert the spectral library into.">
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
33 <option value="msp" selected="true">msp</option>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
34 <option value="mgf">mgf</option>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
35 <option value="json">json</option>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
36 </param>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
37 </inputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
38
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
39 <outputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
40 <data label="${tool.name} from ${spectral_library.ext} to ${output_format} on ${on_string}" name="converted_library" format="msp">
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
41 <change_format>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
42 <when input="output_format" value="mgf" format="mgf" />
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
43 <when input="output_format" value="json" format="json" />
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
44 </change_format>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
45 </data>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
46 </outputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
47
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
48 <tests>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
49 <test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
50 <param name="spectral_library" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
51 <param name="output_format" value="mgf"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
52 <output name="converted_library" file="convert/mgf_out.mgf" ftype="mgf"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
53 </test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
54 <test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
55 <param name="spectral_library" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
56 <param name="output_format" value="json"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
57 <output name="converted_library" file="convert/json_out.json" ftype="json"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
58 </test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
59 <test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
60 <param name="spectral_library" value="convert/mgf_out.mgf" ftype="mgf"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
61 <param name="output_format" value="msp"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
62 <output name="converted_library" file="convert/msp_out.msp" ftype="msp"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
63 </test>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
64 </tests>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
65
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
66
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
67 <help><![CDATA[
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
68 Documentation
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
69 Mass spectral libraries are often stored in various formats, such as `msp`, `mgf` or `json`.
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
70 This tool can be used to convert from one library format to another.
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
71
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
72 Please note that peak comments in `RIKEN` style `msp` files are lost upon conversion.
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
73 Additionally, some of the metadata keywords might change during the conversion process, as they are harmonized internally with matchms.
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
74
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
75 For more documentation on the matchms library see https://github.com/matchms/matchms/blob/master/README.rst and https://matchms.readthedocs.io/en/latest/.
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
76 ]]></help>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
77
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
78
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
79 <expand macro="citations"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
80 </tool>