annotate matchms_convert.xml @ 23:5611c132f607 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
author recetox
date Thu, 14 Aug 2025 12:43:17 +0000
parents 50836782d36f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
1 <tool id="matchms_convert" name="matchms convert" version="@TOOL_VERSION@+galaxy2" profile="23.0" license="MIT">
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
2 <description>convert between mass spectral library formats (.mgf/.msp/.json) using matchms</description>
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
3
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
4 <macros>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
5 <import>macros.xml</import>
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
6 <import>help.xml</import>
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
7 </macros>
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
8
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
9 <expand macro="creator"/>
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
10
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
11 <edam_operations>
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
12 <edam_operation>operation_3434</edam_operation>
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
13 </edam_operations>
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
14 <expand macro="bio.tools"/>
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
15
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
16 <requirements>
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
17 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
18 </requirements>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
19
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
20 <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
21 python ${matchms_python_cli}
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
22 #if $output_file.output_format == "msp":
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
23 #if $output_file.export_style == "ms_lima":
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
24 &&
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
25 sh ${ms_lima_output}
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
26 #end if
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
27 #end if
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
28 ]]></command>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
29
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
30 <configfiles>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
31 <configfile name="matchms_python_cli">
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
32 @init_logger@
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
33
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
34 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
35 from matchms.exporting import save_as_msp, save_as_mgf, save_as_json
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
36 spectra = list(load_from_${spectral_library.ext}("${spectral_library}", ${harmonization_metadata}))
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
37 #if $output_file.output_format == "msp"
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
38 #if $output_file.export_style == "ms_lima"
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
39 save_as_msp(spectra, "${converted_library}", write_peak_comments = ${output_file.export_peak_comments}, style = "riken")
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
40 #else
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
41 save_as_msp(spectra, "${converted_library}", write_peak_comments = ${output_file.export_peak_comments}, style = "${output_file.export_style}")
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
42 #end if
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
43 #else
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
44 save_as_${output_file.output_format}(spectra, "${converted_library}")
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
45 #end if
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
46 </configfile>
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
47 <configfile name="ms_lima_output">
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
48 sed -E "s,[[:space:]]+, ,g" ${converted_library} > ${converted_library}.tmp
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
49
23
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
50 grep -rl 'CHARGE' . | xargs sed '/CHARGE/d' ${converted_library}.tmp > ${converted_library}.tmp1
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
51 grep -rl 'COMPOUND_NAME' . | xargs sed 's/COMPOUND_NAME/NAME/g' ${converted_library}.tmp1 > ${converted_library}.tmp2
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
52
23
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
53 mv ${converted_library}.tmp2 ${converted_library}
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
54 rm -f ${converted_library}.tmp1 ${converted_library}.tmp2 ${converted_library}.tmp
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
55 </configfile>
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
56 </configfiles>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
57
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
58 <inputs>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
59 <param label="Spectra file" name="spectral_library" type="data" format="msp,mgf,json"
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
60 help="Mass spectral library file to convert." />
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
61
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
62 <param label="Harmonization metadata" name="harmonization_metadata" type="boolean" truevalue="True" falsevalue="False"
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
63 checked="true"
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
64 help="Apply metadata harmonization, parsing certain keys required by additional filters or initializing other attributes. The default is True." />
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
65
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
66 <conditional name="output_file">
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
67 <param label="Spectral library format" name="output_format" type="select"
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
68 help="Output format to convert the spectral library into.">
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
69 <option value="msp" selected="true">msp</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
70 <option value="mgf">mgf</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
71 <option value="json">json</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
72 </param>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
73 <when value="msp">
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
74 <param label="Export peak comments" name="export_peak_comments" type="boolean"
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
75 truevalue="True" falsevalue="False" checked="true"
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
76 help="Retain peak comments from individual peaks after the respective mz and intensity pairs when selected." />
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
77 <param label="Export style" name="export_style" type="select"
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
78 help="Converts the keys to a specific style - see [1] for details.. One of ['matchms', 'massbank', 'nist', 'riken', 'gnps']. Default is 'matchms'.">
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
79 <option value="matchms" selected="true">matchms</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
80 <option value="massbank">massbank</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
81 <option value="nist">nist</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
82 <option value="riken">riken</option>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
83 <option value="gnps">gnps</option>
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
84 <option value="ms_lima">ms-lima</option>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
85 </param>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
86 </when>
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
87 <when value="mgf" />
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
88 <when value="json" />
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
89 </conditional>
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
90 </inputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
91
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
92 <outputs>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
93 <data label="${tool.name} from ${spectral_library.ext} to ${output_file.output_format} on ${on_string}" name="converted_library" format="msp">
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
94 <change_format>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
95 <when input="output_file.output_format" value="mgf" format="mgf" />
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
96 <when input="output_file.output_format" value="json" format="json" />
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
97 </change_format>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
98 </data>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
99 </outputs>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
100
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
101 <tests>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
102 <!-- Test 1: Convert to MGF -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
103 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
104 <conditional name="output_file">
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
105 <param name="output_format" value="mgf"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
106 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
107 <param name="spectral_library" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
108 <param name="harmonization_metadata" value="False"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
109 <output name="converted_library" file="convert/mgf_out.mgf" ftype="mgf"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
110 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
111
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
112 <!-- Test 2: Convert to JSON -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
113 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
114 <conditional name="output_file">
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
115 <param name="output_format" value="json"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
116 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
117 <param name="spectral_library" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
118 <param name="harmonization_metadata" value="False"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
119 <output name="converted_library" file="convert/json_out.json" ftype="json"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
120 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
121
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
122 <!-- Test 3: Convert to MSP with matchms style -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
123 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
124 <conditional name="output_file">
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
125 <param name="output_format" value="msp"/>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
126 <param name="export_peak_comments" value="False"/>
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
127 <param name="export_style" value="matchms"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
128 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
129 <param name="spectral_library" value="convert/mgf_out.mgf" ftype="mgf"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
130 <param name="harmonization_metadata" value="False"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
131 <output name="converted_library" file="convert/msp_out.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
132 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
133
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
134 <!-- Test 4: Convert to MSP with harmonization -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
135 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
136 <conditional name="output_file">
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
137 <param name="output_format" value="msp"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
138 <param name="export_peak_comments" value="False"/>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
139 <param name="export_style" value="matchms"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
140 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
141 <param name="spectral_library" value="convert/mgf_out.mgf" ftype="mgf"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
142 <param name="harmonization_metadata" value="True"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
143 <output name="converted_library" file="convert/harmonized_msp_out.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
144 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
145
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
146 <!-- Test 5: Convert to MSP with peak comments -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
147 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
148 <conditional name="output_file">
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
149 <param name="output_format" value="msp"/>
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
150 <param name="export_peak_comments" value="True"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
151 <param name="export_style" value="matchms"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
152 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
153 <param name="spectral_library" value="convert/mgf_out.mgf" ftype="mgf"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
154 <param name="harmonization_metadata" value="True"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
155 <output name="converted_library" file="convert/harmonized_msp_peakcomments_out.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
156 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
157
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
158 <!-- Test 6: Convert to MSP with ms-lima style -->
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
159 <test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
160 <conditional name="output_file">
2
49ef4455b0c2 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 41db9f6295985e278fd23b61955bbaecd1f32c32
recetox
parents: 0
diff changeset
161 <param name="output_format" value="msp"/>
4
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
162 <param name="export_peak_comments" value="False"/>
d4609fbf8ca3 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
recetox
parents: 3
diff changeset
163 <param name="export_style" value="ms_lima"/>
22
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
164 </conditional>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
165 <param name="spectral_library" value="convert/mgf_out.mgf" ftype="mgf"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
166 <param name="harmonization_metadata" value="True"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
167 <output name="converted_library" file="convert/ms_lima_output.msp" ftype="msp"/>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
168 </test>
50836782d36f planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit bd80a813fb2f01f22eed0c874f8911ce4d00762a
recetox
parents: 5
diff changeset
169 </tests>
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
170
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
171
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
172 <help><![CDATA[
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
173 Description
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
174 Mass spectral libraries are often stored in various formats, such as `msp`, `mgf` or `json`.
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
175 This tool can be used to convert from one library format to another.
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
176 Some of the metadata keywords might change during the conversion process, as they are harmonized internally with matchms.
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
177
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
178 .. rubric:: **Footnotes**
23
5611c132f607 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit a57d984a9850c1faa44b6948981eb1303881ba9c
recetox
parents: 22
diff changeset
179 .. [1] Export styles - see the 'export\_key\_conversions' file in the matchms GitHub repository for supported key conversions and detailed description of the export styles.
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
180
3
b9cc12600553 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents: 2
diff changeset
181 @HELP_matchms@
0
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
182 ]]></help>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
183
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
184
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
185 <expand macro="citations"/>
f0ad1b8685fd planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 8989605190816b606fd0bf5be101c6d385a4ce52
recetox
parents:
diff changeset
186 </tool>