annotate matchms_split.xml @ 0:169c72b2ce79 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
author recetox
date Thu, 27 Apr 2023 12:02:44 +0000
parents
children 0cf68b536cd1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
1 <tool id="matchms_split" name="matchms split library" version="@TOOL_VERSION@+galaxy0" python_template_version="3.7">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
2 <macros>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
3 <import>macros.xml</import>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
4 </macros>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
5
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
6 <expand macro="creator"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
7
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
8 <requirements>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
9 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
10 </requirements>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
11
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
12 <command detect_errors='exit_code'><![CDATA[
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
13 python3 '$__tool_directory__/matchms_split.py'
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
14 --filename '$msp_input'
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
15 --method '${method.split_type}'
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
16 --outdir 'output'
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
17 #if $method.split_type == "chunk-size"
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
18 --parameter ${method.chunk_size}
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
19 #else if $method.split_type == "num-chunks"
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
20 --parameter ${method.num_chunks}
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
21 #end if
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
22 ]]></command>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
23 <inputs>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
24 <param type="data" name="msp_input" format="msp"
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
25 help="Spectral library (.msp) to split into smaller chunks. Requires keyword 'compound_name', 'compoundname' or 'name' to identify individual spectra using the one-per-file method."/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
26 <conditional name="method">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
27 <param name="split_type" type="select" label="Splitting method" display="radio" help="Method on how to split the library.">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
28 <option value="chunk-size" selected="true">Split into chunks of specified size</option>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
29 <option value="num-chunks">Split into specified number of chunks</option>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
30 <option value="one-per-file">Split to one spectrum per file</option>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
31 </param>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
32 <when value="chunk-size">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
33 <param name="chunk_size" type="integer" value="1000" min="2" help="Number of spectra per output chunks."/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
34 </when>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
35 <when value="num-chunks">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
36 <param name="num_chunks" type="integer" value="5" min="2" help="Number of chunks into which to split the library."/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
37 </when>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
38 <when value="one-per-file" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
39 </conditional>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
40 </inputs>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
41 <outputs>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
42 <collection format="msp" name="sample" type="list">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
43 <discover_datasets pattern="__designation_and_ext__" ext="msp" directory="output"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
44 </collection >
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
45 </outputs>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
46 <tests>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
47 <test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
48 <param name="msp_input" value="split/sample_input.msp" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
49 <param name="split_type" value="one-per-file" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
50 <output_collection name="sample" type="list">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
51 <element name="1NITROPYRENE" file="split/one-per-file/1NITROPYRENE.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
52 <element name="35DICHLOROPHENOL" file="split/one-per-file/35DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
53 <element name="34DICHLOROPHENOL" file="split/one-per-file/34DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
54 <element name="26DICHLOROPHENOL" file="split/one-per-file/26DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
55 <element name="25DICHLOROPHENOL" file="split/one-per-file/25DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
56 <element name="24DINITROPHENOL" file="split/one-per-file/24DINITROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
57 <element name="24DICHLOROPHENOL" file="split/one-per-file/24DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
58 <element name="246TRICHLOROPHENOL" file="split/one-per-file/246TRICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
59 <element name="245TRICHLOROPHENOL" file="split/one-per-file/245TRICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
60 <element name="23DICHLOROPHENOL" file="split/one-per-file/23DICHLOROPHENOL.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
61 </output_collection>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
62 </test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
63 <test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
64 <param name="msp_input" value="split/sample_input.msp" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
65 <param name="split_type" value="num-chunks" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
66 <param name="num_chunks" value="2" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
67 <output_collection name="sample" type="list">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
68 <element name="chunk_0" file="split/num-chunks/chunk_0.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
69 <element name="chunk_1" file="split/num-chunks/chunk_1.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
70 </output_collection>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
71 </test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
72 <test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
73 <param name="msp_input" value="split/sample_input.msp" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
74 <param name="split_type" value="chunk-size" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
75 <param name="chunk_size" value="4" />
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
76 <output_collection name="sample" type="list">
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
77 <element name="chunk_0" file="split/chunk-size/chunk_0.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
78 <element name="chunk_1" file="split/chunk-size/chunk_1.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
79 <element name="chunk_2" file="split/chunk-size/chunk_2.msp" ftype="msp" compare="contains"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
80 </output_collection>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
81 </test>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
82 </tests>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
83 <help><![CDATA[
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
84 Splitmsp handles input/output files in MSP format using the matchms.importing and matchms.exporting modules (https://matchms.readthedocs.io/en/latest/index.html).
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
85
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
86 Please observe that the `num-chunks` method does not preserve the order of the elements as it uses a `round robin` distribution.
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
87 ]]></help>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
88 <expand macro="citations"/>
169c72b2ce79 planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 5888b20035c9c782b7c94495b0760134f82f4c2e
recetox
parents:
diff changeset
89 </tool>