Mercurial > repos > recetox > matchms_split
view matchms_split.xml @ 17:3155f877b9d5 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 4b8a43b863ff8a0ff1d5a08e516068853adf358d
author | recetox |
---|---|
date | Tue, 16 Apr 2024 11:23:36 +0000 |
parents | 114617e6ad33 |
children | 072c7a101da6 |
line wrap: on
line source
<tool id="matchms_split" name="matchms split library" version="@TOOL_VERSION@+galaxy1" profile="21.09"> <description>split a large library into subsets</description> <macros> <import>macros.xml</import> <import>help.xml</import> </macros> <edam_operations> <edam_operation>operation_3359</edam_operation> </edam_operations> <expand macro="bio.tools"/> <expand macro="creator"/> <requirements> <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> </requirements> <command detect_errors='exit_code'><![CDATA[ python3 '$__tool_directory__/matchms_split.py' --filename '$msp_input' --method '${method.split_type}' --outdir 'output' #if $method.split_type == "chunk-size" --parameter ${method.chunk_size} #else if $method.split_type == "num-chunks" --parameter ${method.num_chunks} #end if ]]></command> <inputs> <param type="data" name="msp_input" format="msp" 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."/> <conditional name="method"> <param name="split_type" type="select" label="Splitting method" display="radio" help="Method on how to split the library."> <option value="chunk-size" selected="true">Split into chunks of specified size</option> <option value="num-chunks">Split into specified number of chunks</option> <option value="one-per-file">Split to one spectrum per file</option> </param> <when value="chunk-size"> <param name="chunk_size" type="integer" value="1000" min="2" help="Number of spectra per output chunks."/> </when> <when value="num-chunks"> <param name="num_chunks" type="integer" value="5" min="2" help="Number of chunks into which to split the library."/> </when> <when value="one-per-file" /> </conditional> </inputs> <outputs> <collection format="msp" name="sample" type="list"> <discover_datasets pattern="__designation_and_ext__" ext="msp" directory="output"/> </collection > </outputs> <tests> <test> <param name="msp_input" value="split/sample_input.msp" /> <param name="split_type" value="one-per-file" /> <output_collection name="sample" type="list"> <element name="0" file="split/one-per-file/0.msp" ftype="msp" compare="diff"/> <element name="1" file="split/one-per-file/1.msp" ftype="msp" compare="diff"/> <element name="2" file="split/one-per-file/2.msp" ftype="msp" compare="diff"/> <element name="3" file="split/one-per-file/3.msp" ftype="msp" compare="diff"/> <element name="4" file="split/one-per-file/4.msp" ftype="msp" compare="diff"/> <element name="5" file="split/one-per-file/5.msp" ftype="msp" compare="diff"/> <element name="6" file="split/one-per-file/6.msp" ftype="msp" compare="diff"/> <element name="7" file="split/one-per-file/7.msp" ftype="msp" compare="diff"/> <element name="8" file="split/one-per-file/8.msp" ftype="msp" compare="diff"/> <element name="9" file="split/one-per-file/9.msp" ftype="msp" compare="diff"/> </output_collection> </test> <test> <param name="msp_input" value="split/sample_input.msp" /> <param name="split_type" value="num-chunks" /> <param name="num_chunks" value="2" /> <output_collection name="sample" type="list"> <element name="chunk_0" file="split/num-chunks/chunk_0.msp" ftype="msp" compare="diff"/> <element name="chunk_1" file="split/num-chunks/chunk_1.msp" ftype="msp" compare="diff"/> </output_collection> </test> <test> <param name="msp_input" value="split/sample_input.msp" /> <param name="split_type" value="chunk-size" /> <param name="chunk_size" value="4" /> <output_collection name="sample" type="list"> <element name="chunk_0" file="split/chunk-size/chunk_0.msp" ftype="msp" compare="diff"/> <element name="chunk_1" file="split/chunk-size/chunk_1.msp" ftype="msp" compare="diff"/> <element name="chunk_2" file="split/chunk-size/chunk_2.msp" ftype="msp" compare="diff"/> </output_collection> </test> </tests> <help> Description This tool can be used to split a mass spectral library into smaller subsets for further processing. This can be used to perform efficient spectral matching with large libraries, using job-level parallelism. Please observe that the `num-chunks` method does not preserve the order of the elements as it uses a `round robin` distribution. @HELP_matchms@ </help> <expand macro="citations"/> </tool>