Mercurial > repos > iuc > mzmine_batch
view mzmine_batch.xml @ 1:90d60c9da21e draft default tip
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/blob/master/tools/mzmine/ commit 889d26f1e96edf1f2608ce0dba2d66e8ee60e313
author | iuc |
---|---|
date | Fri, 10 Nov 2023 14:20:45 +0000 |
parents | 02e802817d48 |
children |
line wrap: on
line source
<tool id="mzmine_batch" name="MZMine batch" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05"> <macros> <token name="@TOOL_VERSION@">3.9.0</token> <token name="@VERSION_SUFFIX@">0</token> </macros> <xrefs> <xref type="bio.tools">mzmine</xref> </xrefs> <requirements> <requirement type="package" version="@TOOL_VERSION@">mzmine</requirement> <requirement type="package" version="3.11">python</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ #import re mkdir -p input && #for $i in $input #set escaped_i = re.sub('[^\s\w\-\.]', '_', str($i.element_identifier)) ln -s '$i' 'input/$escaped_i'.$i.ext && echo 'input/$escaped_i'.$i.ext >> input.txt && #end for #if $libraries mkdir -p libraries && #for $l in $libraries #set escaped_l = re.sub('[^\s\w\-\.]', '_', str($l.element_identifier)) ln -s '$l' 'libraries/$escaped_l'.$l.ext && echo 'libraries/$escaped_l'.$l.ext >> libraries.txt && #end for #end if ## modify output paths in batch XML to relative path ## - any output will be redirected to ./output/BASENAME mkdir -p output/ && python '$__tool_directory__/set_path.py' --input '$batch' --output batch.xml #if $localdb --localdb '$localdb' #end if && ## https://github.com/mzmine/mzmine3/issues/1534 JAVA_OPTS="-XX:ActiveProcessorCount=\${GALAXY_SLOTS:-1}" mzmine --batch 'batch.xml' --input 'input.txt' #if $libraries --libraries 'libraries.txt' #end if --memory "\${MZMINE_MEMORY:-none}" --temp "\${TMPDIR:-\$_GALAXY_JOB_TMP_DIR}" --threads \${GALAXY_SLOTS:-1} ## ignored parameters ## -p,--pref <arg> preferences file ## -r,--running keep MZmine running in headless mode ## -tdfpseudoprofile Loads pseudo-profile frame spectra for tdf files ## instead of centroided spectra. ## -tsfprofile Loads profile spectra from .tsf data instead of ## centroid spectra. ]]></command> <inputs> <param argument="--batch" type="data" format="xml" label="MZMine batch file" help="XML batch file (ideally created with version @TOOL_VERSION@)"/> <param argument="--input" type="data" format="mzml,mzxml,csv" multiple="true" label="Spectra (mzml)"/> <param argument="--libraries" type="data" format="json,mgf,msp" multiple="true" optional="true" label="Spectral libraries"/> <param name="localdb" type="data" format="csv,tsv,tabular,txt" optional="true" label="Local database" help="For 'Custom database search'"/> </inputs> <outputs> <collection name="output" type="list"> <discover_datasets pattern="__name_and_ext__" directory="output"/> </collection> </outputs> <tests> <!-- <test> <param name="batch" value="test_small.xml" ftype="xml"/> <param name="input" location="https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_a.mzML,https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_b.mzXML"/> <param name="libraries" value="GNPS-FAULKNERLEGACY.json" ftype="json"/> <output_collection name="output" count="3" type="list"> <element name="test2_iimn_gnps" ftype="mgf"> <assert_contents> <has_n_lines n="2103"/> <has_text text="BEGIN IONS"/> </assert_contents> </element> <element name="test2_iimn_gnps_quant" ftype="csv"> <assert_contents> <has_n_lines n="34"/> <has_n_columns sep="," n="16"/> </assert_contents> </element> <element name="test2_sirius" ftype="mgf"> <assert_contents> <has_n_lines n="54406"/> <has_text text="BEGIN IONS"/> </assert_contents> </element> </output_collection> <assert_stderr> <has_text text="INFO: Starting processing of task Local CSV identification using database" negate="true"/> <has_text text="INFO: Finished a batch of 11 steps"/> </assert_stderr> </test> --> <!-- test with localdb --> <!-- <test> <param name="batch" value="test_localdatabase.xml" ftype="xml"/> <param name="input" location="https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_a.mzML,https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_b.mzXML"/> <param name="libraries" value="GNPS-FAULKNERLEGACY.json" ftype="json"/> <param name="localdb" value="local_database.csv" ftype="csv"/> <output_collection name="output" count="3" type="list"> <element name="test2_iimn_gnps" ftype="mgf"> <assert_contents> <has_n_lines n="2103"/> <has_text text="BEGIN IONS"/> </assert_contents> </element> <element name="test2_iimn_gnps_quant" ftype="csv"> <assert_contents> <has_n_lines n="34"/> <has_n_columns sep="," n="16"/> </assert_contents> </element> <element name="test2_sirius" ftype="mgf"> <assert_contents> <has_n_lines n="54406"/> <has_text text="BEGIN IONS"/> </assert_contents> </element> </output_collection> <assert_stderr> <has_text text="INFO: Starting processing of task Local CSV identification using database"/> <has_text text="INFO: Finished a batch of 12 steps"/> </assert_stderr> </test> --> <!-- test with localdb in batch, but user does not provide one--> <!-- <test expect_failure="true" expect_exit_code="1"> <param name="batch" value="test_localdatabase.xml" ftype="xml"/> <param name="input" location="https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_a.mzML,https://raw.githubusercontent.com/mzmine/mzmine3/v@TOOL_VERSION@/src/test/resources/rawdatafiles/DOM_b.mzXML"/> <param name="libraries" value="GNPS-FAULKNERLEGACY.json" ftype="json"/> <assert_stderr> <has_text text="Batch file contains LocalCSVDatabaseSearchModule but no local DB CSV file given"/> </assert_stderr> </test> --> </tests> <help><![CDATA[ MZmine 3 is an open-source software for mass-spectrometry data processing, with the main focus on LC-MS data. This Galaxy tool allows to execute MZmine batches. That is you can create MZmine batch (XML) files thatdescribe the parameters of a MZmine analysis using the MZmine GUI and use this to execute such an analysis on the Galaxy platform. **Inputs** - MZMine batch file in XML format. This file describes the parameters for a MZmine batch analysis. It can be generated with the MZmine GUI (preferentiall with a matching version, i.e. @TOOL_VERSION@). - Input spectra in mzml format - Spectra libraries in mgf or json format (optional) If the batch file contains steps requiring input data sets these need to be provided via the optional inputs. Currently this is: - 'Local database' for a 'Custom database search' (LocalCSVDatabaseSearchModule) step Please open an issue if inputs for other steps are needed: https://github.com/galaxyproject/tools-iuc/issues/new **Outputs** Galaxy will store all outputs of MZMine in a single collection. When specifying the batch XML file one should pay attention to use file extensions that correspond to Galaxy datatypes (which allows Galaxy to easily autodetect the datatype). The following extensions can be used (lower/upper case does not matter): - mzml - netcdf - mgf - txt - msp - csv - mztab - mztab2 (this is mzTab-m) - json - tabular (Galaxy's tsv implementation) Specific datasets from the collection can be accessed using the *Extract dataset* tool, e.g. for further processing in Galaxy. ]]></help> <citations> <citation type="doi">10.1038/s41587-023-01690-2</citation> </citations> </tool>