Mercurial > repos > galaxyp > openms_gnpsexport
diff GNPSExport.xml @ 5:87a970d1514b draft default tip
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
author | galaxyp |
---|---|
date | Fri, 14 Jun 2024 21:33:13 +0000 |
parents | 2da14ae3844a |
children |
line wrap: on
line diff
--- a/GNPSExport.xml Thu Dec 01 18:57:27 2022 +0000 +++ b/GNPSExport.xml Fri Jun 14 21:33:13 2024 +0000 @@ -1,9 +1,7 @@ -<?xml version='1.0' encoding='UTF-8'?> <!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.--> -<!--Proposed Tool Section: [File Handling]--> +<!--Proposed Tool Section: [File Converter]--> <tool id="GNPSExport" name="GNPSExport" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05"> - <description>Tool to export representative consensus MS/MS scan per consensusElement into a .MGF file format. -See the documentation on https://ccms-ucsd.github.io/GNPSDocumentation/featurebasedmolecularnetworking-with-openms</description> + <description>Tool to export representative consensus MS/MS scan per consensusElement into a .MGF file format</description> <macros> <token name="@EXECUTABLE@">GNPSExport</token> <import>macros.xml</import> @@ -16,15 +14,22 @@ ## Preprocessing mkdir in_cm && -ln -s '$in_cm' 'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)' && +cp '$in_cm' 'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)' && mkdir in_mzml_cond.in_mzml && #if $in_mzml_cond.in_mzml_select == "no" mkdir ${' '.join(["'in_mzml_cond.in_mzml/%s'" % (i) for i, f in enumerate($in_mzml_cond.in_mzml) if f])} && -${' '.join(["ln -s '%s' 'in_mzml_cond.in_mzml/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_mzml_cond.in_mzml) if f])} +${' '.join(["cp '%s' 'in_mzml_cond.in_mzml/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_mzml_cond.in_mzml) if f])} #else -ln -s '$in_mzml_cond.in_mzml' 'in_mzml_cond.in_mzml/${re.sub("[^\w\-_]", "_", $in_mzml_cond.in_mzml.element_identifier)}.$gxy2omsext($in_mzml_cond.in_mzml.ext)' && +cp '$in_mzml_cond.in_mzml' 'in_mzml_cond.in_mzml/${re.sub("[^\w\-_]", "_", $in_mzml_cond.in_mzml.element_identifier)}.$gxy2omsext($in_mzml_cond.in_mzml.ext)' && #end if mkdir out && +mkdir out_quantification && +#if "out_pairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + mkdir out_pairs && +#end if +#if "out_meta_values_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + mkdir out_meta_values && +#end if ## Main program call @@ -42,9 +47,29 @@ #end if -out 'out/output.${gxy2omsext("mgf")}' +-out_quantification +'out_quantification/output.${gxy2omsext("txt")}' +#if "out_pairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + -out_pairs + 'out_pairs/output.${gxy2omsext("csv")}' +#end if +#if "out_meta_values_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + -out_meta_values + 'out_meta_values/output.${gxy2omsext("tabular")}' +#end if +#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0 + | tee '$stdout' +#end if ## Postprocessing && mv 'out/output.${gxy2omsext("mgf")}' '$out' +&& mv 'out_quantification/output.${gxy2omsext("txt")}' '$out_quantification' +#if "out_pairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + && mv 'out_pairs/output.${gxy2omsext("csv")}' '$out_pairs' +#end if +#if "out_meta_values_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + && mv 'out_meta_values/output.${gxy2omsext("tabular")}' '$out_meta_values' +#end if #if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS && mv '@EXECUTABLE@.ctd' '$ctd_out' #end if]]></command> @@ -53,47 +78,57 @@ <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile> </configfiles> <inputs> - <param argument="-in_cm" type="data" format="consensusxml" optional="false" label="Input consensusXML file containing only consensusElements with "peptide" annotations" help=" select consensusxml data sets(s)"/> + <param argument="-in_cm" type="data" format="consensusxml" label="Input consensusXML file containing only consensusElements with "peptide" annotations" help=" select consensusxml data sets(s)"/> <conditional name="in_mzml_cond"> <param name="in_mzml_select" type="select" label="Run tool in batch mode for -in_mzml"> <option value="no">No: process all datasets jointly</option> <option value="yes">Yes: process each dataset in an independent job</option> </param> <when value="no"> - <param argument="-in_mzml" type="data" format="mzml" multiple="true" optional="false" label="Original mzml files containing the ms2 spectra (aka peptide annotation)" help="Must be in order that the consensusXML file maps the original mzML files select mzml data sets(s)"/> + <param argument="-in_mzml" type="data" format="mzml" multiple="true" label="Original mzml files containing the ms2 spectra (aka peptide annotation)" help="Must be in order that the consensusXML file maps the original mzML files select mzml data sets(s)"/> </when> <when value="yes"> - <param argument="-in_mzml" type="data" format="mzml" multiple="false" optional="false" label="Original mzml files containing the ms2 spectra (aka peptide annotation)" help="Must be in order that the consensusXML file maps the original mzML files select mzml data sets(s)"/> + <param argument="-in_mzml" type="data" format="mzml" label="Original mzml files containing the ms2 spectra (aka peptide annotation)" help="Must be in order that the consensusXML file maps the original mzML files select mzml data sets(s)"/> </when> </conditional> - <param argument="-output_type" type="select" optional="true" label="specificity of mgf output information" help=""> + <param argument="-output_type" type="select" label="specificity of mgf output information" help=""> <option value="merged_spectra">merged_spectra</option> <option value="most_intense" selected="true">most_intense</option> <expand macro="list_string_san" name="output_type"/> </param> - <param argument="-peptide_cutoff" type="integer" optional="true" min="-1" value="5" label="Number of most intense peptides to consider per consensus element; '-1' to consider all identifications" help=""/> - <param argument="-ms2_bin_size" type="float" optional="true" min="0.0" value="0.019999999552965" label="Bin size (Da) for fragment ions when merging ms2 scans" help=""/> + <param argument="-peptide_cutoff" type="integer" min="-1" value="5" label="Number of most intense peptides to consider per consensus element; '-1' to consider all identifications" help=""/> + <param argument="-ms2_bin_size" type="float" min="0.0" value="0.019999999552965" label="Bin size (Da) for fragment ions when merging ms2 scans" help=""/> <section name="merged_spectra" title="Options for exporting mgf file with merged spectra per consensusElement" help="" expanded="false"> - <param name="cos_similarity" argument="-merged_spectra:cos_similarity" type="float" optional="true" min="0.0" value="0.9" label="Cosine similarity threshold for merged_spectra output" help=""/> + <param name="cos_similarity" argument="-merged_spectra:cos_similarity" type="float" min="0.0" value="0.9" label="Cosine similarity threshold for merged_spectra output" help=""/> </section> <expand macro="adv_opts_macro"> <param argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overrides tool-specific checks" help=""/> - <param argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help=""> + <param argument="-test" type="hidden" value="False" label="Enables the test mode (needed for internal use only)" help="" optional="true"> <expand macro="list_string_san" name="test"/> </param> </expand> <param name="OPTIONAL_OUTPUTS" type="select" optional="true" multiple="true" label="Optional outputs"> + <option value="out_pairs_FLAG">out_pairs (Output supplementary pairs table for IIMN)</option> + <option value="out_meta_values_FLAG">out_meta_values (Output meta value file)</option> <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option> </param> </inputs> <outputs> <data name="out" label="${tool.name} on ${on_string}: out" format="mgf"/> + <data name="out_quantification" label="${tool.name} on ${on_string}: out_quantification" format="txt"/> + <data name="out_pairs" label="${tool.name} on ${on_string}: out_pairs" format="csv"> + <filter>OPTIONAL_OUTPUTS is not None and "out_pairs_FLAG" in OPTIONAL_OUTPUTS</filter> + </data> + <data name="out_meta_values" label="${tool.name} on ${on_string}: out_meta_values" format="tabular"> + <filter>OPTIONAL_OUTPUTS is not None and "out_meta_values_FLAG" in OPTIONAL_OUTPUTS</filter> + </data> <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd"> <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter> </data> </outputs> - <tests><!-- TOPP_GNPSExport_1 --> - <test expect_num_outputs="2"> + <tests> + <!-- TOPP_GNPSExport_1 --> + <test expect_num_outputs="3"> <section name="adv_opts"> <param name="force" value="false"/> <param name="test" value="true"/> @@ -102,7 +137,8 @@ <conditional name="in_mzml_cond"> <param name="in_mzml" value="GNPSExport_mzml1.mzML,GNPSExport_mzml2.mzML"/> </conditional> - <output name="out" file="GNPSExport_1_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out" value="GNPSExport_1_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out_quantification" value="GNPSExport_1_out_quant.txt" compare="sim_size" delta_frac="0.7" ftype="txt"/> <param name="output_type" value="most_intense"/> <param name="peptide_cutoff" value="10"/> <param name="ms2_bin_size" value="2.0"/> @@ -115,9 +151,12 @@ <is_valid_xml/> </assert_contents> </output> + <assert_stdout> + <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/> + </assert_stdout> </test> <!-- TOPP_GNPSExport_2 --> - <test expect_num_outputs="2"> + <test expect_num_outputs="3"> <section name="adv_opts"> <param name="force" value="false"/> <param name="test" value="true"/> @@ -126,7 +165,8 @@ <conditional name="in_mzml_cond"> <param name="in_mzml" value="GNPSExport_mzml1.mzML,GNPSExport_mzml2.mzML"/> </conditional> - <output name="out" file="GNPSExport_2_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out" value="GNPSExport_2_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out_quantification" value="GNPSExport_2_out_quant.tmp" compare="sim_size" delta_frac="0.7" ftype="txt"/> <param name="output_type" value="merged_spectra"/> <param name="peptide_cutoff" value="10"/> <param name="ms2_bin_size" value="2.0"/> @@ -139,9 +179,12 @@ <is_valid_xml/> </assert_contents> </output> + <assert_stdout> + <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/> + </assert_stdout> </test> <!-- TOPP_GNPSExport_3 --> - <test expect_num_outputs="2"> + <test expect_num_outputs="3"> <section name="adv_opts"> <param name="force" value="false"/> <param name="test" value="true"/> @@ -150,7 +193,8 @@ <conditional name="in_mzml_cond"> <param name="in_mzml" value="GNPSExport_mzml1.mzML,GNPSExport_mzml2.mzML"/> </conditional> - <output name="out" file="GNPSExport_3_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out" value="GNPSExport_3_out.mgf" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out_quantification" value="GNPSExport_3_out_quant.tmp" compare="sim_size" delta_frac="0.7" ftype="txt"/> <param name="output_type" value="most_intense"/> <param name="peptide_cutoff" value="10"/> <param name="ms2_bin_size" value="0.02"/> @@ -163,12 +207,45 @@ <is_valid_xml/> </assert_contents> </output> + <assert_stdout> + <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/> + </assert_stdout> + </test> + <!-- TOPP_GNPSExport_4 --> + <test expect_num_outputs="5"> + <section name="adv_opts"> + <param name="force" value="false"/> + <param name="test" value="true"/> + </section> + <param name="in_cm" value="GNPSExport_cons2.consensusXML"/> + <conditional name="in_mzml_cond"> + <param name="in_mzml" value="GNPSExport_mzml1.mzML,GNPSExport_mzml2.mzML"/> + </conditional> + <output name="out" value="GNPSExport_4_out.tmp" compare="sim_size" delta_frac="0.7" ftype="mgf"/> + <output name="out_quantification" value="GNPSExport_4_out_quant.txt" compare="sim_size" delta_frac="0.7" ftype="txt"/> + <output name="out_pairs" value="GNPSExport_4_out_pairs.csv" compare="sim_size" delta_frac="0.7" ftype="csv"/> + <output name="out_meta_values" value="GNPSExport_4_out_meta_values.tsv" compare="sim_size" delta_frac="0.7" ftype="tabular"/> + <param name="output_type" value="most_intense"/> + <param name="peptide_cutoff" value="5"/> + <param name="ms2_bin_size" value="0.019999999552965"/> + <section name="merged_spectra"> + <param name="cos_similarity" value="0.9"/> + </section> + <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_pairs_FLAG,out_meta_values_FLAG"/> + <output name="ctd_out" ftype="xml"> + <assert_contents> + <is_valid_xml/> + </assert_contents> + </output> + <assert_stdout> + <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/> + </assert_stdout> </test> </tests> <help><![CDATA[Tool to export representative consensus MS/MS scan per consensusElement into a .MGF file format. See the documentation on https://ccms-ucsd.github.io/GNPSDocumentation/featurebasedmolecularnetworking-with-openms -For more information, visit http://www.openms.de/doxygen/release/2.8.0/html/TOPP_GNPSExport.html]]></help> +For more information, visit https://openms.de/doxygen/release/3.1.0/html/TOPP_GNPSExport.html]]></help> <expand macro="references"/> </tool>