diff FileConverter.xml @ 11:f2388622d581 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 12:46:14 +0000
parents 1a186cc82c8d
children 62e19948b50f
line wrap: on
line diff
--- a/FileConverter.xml	Fri May 17 10:11:48 2019 -0400
+++ b/FileConverter.xml	Wed Sep 09 12:46:14 2020 +0000
@@ -1,113 +1,116 @@
 <?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]-->
-<tool id="FileConverter" name="FileConverter" version="2.3.0">
+<tool id="FileConverter" name="FileConverter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Converts between different MS file formats.</description>
   <macros>
     <token name="@EXECUTABLE@">FileConverter</token>
     <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
   </macros>
-  <expand macro="references"/>
+  <expand macro="requirements"/>
   <expand macro="stdio"/>
-  <expand macro="requirements"/>
-  <command detect_errors="aggressive"><![CDATA[FileConverter
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
+
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
+
+## Main program call
+
+set -o pipefail &&
+@EXECUTABLE@ -write_ctd ./ &&
+python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
+@EXECUTABLE@ -ini @EXECUTABLE@.ctd
+-in
+'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
+-out
+'out/output.${out_type}'
 
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_UID_postprocessing:
-  -UID_postprocessing
-  #if " " in str($adv_opts.param_UID_postprocessing):
-    "$adv_opts.param_UID_postprocessing"
-  #else
-    $adv_opts.param_UID_postprocessing
-  #end if
-#end if
-    #if $adv_opts.param_out_type:
-  -out_type
-  #if " " in str($adv_opts.param_out_type):
-    "$adv_opts.param_out_type"
-  #else
-    $adv_opts.param_out_type
-  #end if
-#end if
-    #if $adv_opts.param_TIC_DTA2D:
-  -TIC_DTA2D
-#end if
-    #if $adv_opts.param_MGF_compact:
-  -MGF_compact
-#end if
-    #if $adv_opts.param_force_MaxQuant_compatibility:
-  -force_MaxQuant_compatibility
-#end if
-    #if $adv_opts.param_force_TPP_compatibility:
-  -force_TPP_compatibility
-#end if
-    #if $adv_opts.param_write_scan_index:
-  -write_scan_index
-  #if " " in str($adv_opts.param_write_scan_index):
-    "$adv_opts.param_write_scan_index"
-  #else
-    $adv_opts.param_write_scan_index
-  #end if
-#end if
-    #if $adv_opts.param_lossy_compression:
-  -lossy_compression
-#end if
-    #if $adv_opts.param_lossy_mass_accuracy:
-  -lossy_mass_accuracy $adv_opts.param_lossy_mass_accuracy
-#end if
-    #if $adv_opts.param_process_lowmemory:
-  -process_lowmemory
-#end if
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+## Postprocessing
+&& mv 'out/output.${out_type}' '$out'
+#if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
+  && mv '@EXECUTABLE@.ctd' '$ctd_out'
+#end if]]></command>
+  <configfiles>
+    <inputs name="args_json" data_style="paths"/>
+    <configfile name="hardcoded_json"><![CDATA[{"ThermoRaw_executable": "ThermoRawFileParser.exe", "log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
   <inputs>
-    <param name="param_in" type="data" format="mzData,mzxml,mzml,cachedMzML,dta,dta2d,mgf,featurexml,consensusxml,ms2,fid,tabular,peplist,kroenik,tabular" optional="False" label="Input file to convert" help="(-in) "/>
-    <expand macro="advanced_options">
-      <param name="param_UID_postprocessing" display="radio" type="select" optional="False" value="ensure" label="unique ID post-processing for output data" help="(-UID_postprocessing) &lt;br&gt;'none' keeps current IDs even if invalid. &lt;br&gt;'ensure' keeps current IDs but reassigns invalid ones. &lt;br&gt;'reassign' assigns new unique IDs">
+    <param name="in" argument="-in" type="data" format="consensusxml,dta,dta2d,edta,featurexml,kroenik,mgf,ms2,mzdata,mzml,mzxml,peplist,tabular,thermo.raw" optional="false" label="Input file to convert" help=" select consensusxml,dta,dta2d,edta,featurexml,kroenik,mgf,ms2,mzdata,mzml,mzxml,peplist,tabular,thermo.raw data sets(s)"/>
+    <param name="out_type" argument="-out_type" type="select" optional="false" label="Output file type -- default: determined from file extension or content" help="Note: that not all conversion paths work or make sense">
+      <option value="consensusXML">consensusxml</option>
+      <option value="csv">csv</option>
+      <option value="dta2d">dta2d</option>
+      <option value="edta">edta</option>
+      <option value="featureXML">featurexml</option>
+      <option value="mgf">mgf</option>
+      <option value="mzData">mzdata</option>
+      <option value="mzML">mzml</option>
+      <option value="mzXML">mzxml</option>
+      <expand macro="list_string_san"/>
+    </param>
+    <expand macro="adv_opts_macro">
+      <param name="UID_postprocessing" argument="-UID_postprocessing" display="radio" type="select" optional="false" label="unique ID post-processing for output data" help="'none' keeps current IDs even if invalid.. 'ensure' keeps current IDs but reassigns invalid ones.. 'reassign' assigns new unique IDs">
         <option value="none">none</option>
         <option value="ensure" selected="true">ensure</option>
         <option value="reassign">reassign</option>
+        <expand macro="list_string_san"/>
       </param>
-      <param name="param_out_type" type="select" optional="True" label="Output file type -- default: determined from file extension or content &lt;br&gt;Note: that not all conversion paths work or make sense" help="(-out_type) ">
-        <option value="mzData">mzData</option>
-        <option value="mzXML">mzXML</option>
-        <option value="mzML">mzML</option>
-        <option value="cachedMzML">cachedMzML</option>
-        <option value="dta2d">dta2d</option>
-        <option value="mgf">mgf</option>
-        <option value="featureXML">featureXML</option>
-        <option value="consensusXML">consensusXML</option>
-        <option value="edta">edta</option>
-        <option value="csv">csv</option>
+      <param name="TIC_DTA2D" argument="-TIC_DTA2D" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Export the TIC instead of the entire experiment in mzML/mzData/mzXML -&gt; DTA2D conversions" help=""/>
+      <param name="MGF_compact" argument="-MGF_compact" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use a more compact format when writing MGF (no zero-intensity peaks, limited number of decimal places)" help=""/>
+      <param name="force_MaxQuant_compatibility" argument="-force_MaxQuant_compatibility" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[mzXML output only] Make sure that MaxQuant can read the mzXML and set the msManufacturer to 'Thermo Scientific'" help=""/>
+      <param name="convert_to_chromatograms" argument="-convert_to_chromatograms" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[mzML output only] Assumes that the provided spectra represent data in SRM mode or targeted MS1 mode and converts them to chromatogram data" help=""/>
+      <param name="force_TPP_compatibility" argument="-force_TPP_compatibility" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[mzML output only] Make sure that TPP parsers can read the mzML and the precursor ion m/z in the file (otherwise it will be set to zero by the TPP)" help=""/>
+      <param name="change_im_format" argument="-change_im_format" display="radio" type="select" optional="false" label="[mzML output only] How to store ion mobility scans (none: no change in format, multiple: store each frame as multiple scans, one per drift time value, single: store whole frame as single scan with IM values in a FloatDataArray" help="">
+        <option value="none" selected="true">none</option>
+        <option value="multiple">multiple</option>
+        <option value="single">single</option>
+        <expand macro="list_string_san"/>
       </param>
-      <param name="param_TIC_DTA2D" display="radio" type="boolean" truevalue="-TIC_DTA2D" falsevalue="" checked="false" optional="True" label="Export the TIC instead of the entire experiment in mzML/mzData/mzXML -&gt; DTA2D conversions" help="(-TIC_DTA2D) "/>
-      <param name="param_MGF_compact" display="radio" type="boolean" truevalue="-MGF_compact" falsevalue="" checked="false" optional="True" label="Use a more compact format when writing MGF (no zero-intensity peaks, limited number of decimal places)" help="(-MGF_compact) "/>
-      <param name="param_force_MaxQuant_compatibility" display="radio" type="boolean" truevalue="-force_MaxQuant_compatibility" falsevalue="" checked="false" optional="True" label="[mzXML output only] Make sure that MaxQuant can read the mzXML and set the msManufacturer to 'Thermo Scientific'" help="(-force_MaxQuant_compatibility) "/>
-      <param name="param_force_TPP_compatibility" display="radio" type="boolean" truevalue="-force_TPP_compatibility" falsevalue="" checked="false" optional="True" label="[mXML output only] Make sure that TPP parsers can read the mzML and the precursor ion m/z in the file (otherwise it will be set to zero by the TPP)" help="(-force_TPP_compatibility) "/>
-      <param name="param_write_scan_index" display="radio" type="select" optional="False" value="true" label="Append an index when writing mzML or mzXML files" help="(-write_scan_index) Some external tools might rely on it">
-        <option value="true" selected="true">true</option>
-        <option value="false">false</option>
+      <param name="write_scan_index" argument="-write_scan_index" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Append an index when writing mzML or mzXML files" help="Some external tools might rely on it"/>
+      <param name="lossy_compression" argument="-lossy_compression" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use numpress compression to achieve optimally small file size using linear compression for m/z domain and slof for intensity and float data arrays (attention: may cause small loss of precision; only for mzML data)" help=""/>
+      <param name="lossy_mass_accuracy" argument="-lossy_mass_accuracy" type="float" optional="true" value="-1.0" label="Desired (absolute) m/z accuracy for lossy compression" help="(e.g. use 0.0001 for a mass accuracy of 0.2 ppm at 500 m/z, default uses -1.0 for maximal accuracy)"/>
+      <param name="process_lowmemory" argument="-process_lowmemory" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Whether to process the file on the fly without loading the whole file into memory first (only for conversions of mzXML/mzML to mzML)" help="Note: this flag will prevent conversion from spectra to chromatograms"/>
+      <param name="no_peak_picking" argument="-no_peak_picking" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Disables vendor peak picking for raw files" help=""/>
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
+      <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
+        <expand macro="list_string_san"/>
       </param>
-      <param name="param_lossy_compression" display="radio" type="boolean" truevalue="-lossy_compression" falsevalue="" checked="false" optional="True" label="Use numpress compression to achieve optimally small file size (attention: may cause small loss of precision; only for mzML data)" help="(-lossy_compression) "/>
-      <param name="param_lossy_mass_accuracy" type="float" value="-1.0" label="Desired (absolute) m/z accuracy for lossy compression (" help="(-lossy_mass_accuracy) e.g. use 0.0001 for a mass accuracy of 0.2 ppm at 500 m/z, default uses -1.0 for maximal accuracy)"/>
-      <param name="param_process_lowmemory" display="radio" type="boolean" truevalue="-process_lowmemory" falsevalue="" checked="false" optional="True" label="Whether to process the file on the fly without loading the whole file into memory first (only for conversions of mzXML/mzML to mzML)" help="(-process_lowmemory) &lt;br&gt;Note: this flag will prevent conversion from spectra to chromatograms"/>
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
     </expand>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true">
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
   </inputs>
   <outputs>
-    <data name="param_out" metadata_source="param_in" auto_format="true"/>
+    <data name="out" label="${tool.name} on ${on_string}: out">
+      <change_format>
+        <when input="out_type" value="consensusXML" format="consensusxml"/>
+        <when input="out_type" value="csv" format="csv"/>
+        <when input="out_type" value="dta2d" format="dta2d"/>
+        <when input="out_type" value="edta" format="edta"/>
+        <when input="out_type" value="featureXML" format="featurexml"/>
+        <when input="out_type" value="mgf" format="mgf"/>
+        <when input="out_type" value="mzData" format="mzdata"/>
+        <when input="out_type" value="mzML" format="mzml"/>
+        <when input="out_type" value="mzXML" format="mzxml"/>
+      </change_format>
+    </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>
-  <help>Converts between different MS file formats.
+  <tests>
+    <expand macro="autotest_FileConverter"/>
+    <expand macro="manutest_FileConverter"/>
+  </tests>
+  <help><![CDATA[Converts between different MS file formats.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_FileConverter.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_FileConverter.html]]></help>
+  <expand macro="references"/>
 </tool>