diff TextExporter.xml @ 9:27aeff17fd2e draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
author galaxyp
date Thu, 27 Aug 2020 19:45:29 -0400
parents 3a2a31d4032c
children 1c596fdaf34a
line wrap: on
line diff
--- a/TextExporter.xml	Fri May 17 09:57:49 2019 -0400
+++ b/TextExporter.xml	Thu Aug 27 19:45:29 2020 -0400
@@ -1,144 +1,167 @@
 <?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="TextExporter" name="TextExporter" version="2.3.0">
+<tool id="TextExporter" name="TextExporter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Exports various XML formats to a text file.</description>
   <macros>
     <token name="@EXECUTABLE@">TextExporter</token>
     <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
   </macros>
-  <expand macro="references"/>
-  <expand macro="stdio"/>
   <expand macro="requirements"/>
-  <command detect_errors="aggressive"><![CDATA[TextExporter
+  <expand macro="stdio"/>
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_in:
-  -in $param_in
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir out &&
 #end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_separator:
-  -separator     "$param_separator"
-#end if
-#if $param_replacement:
-  -replacement     "$param_replacement"
+#if "centroids_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir consensus_centroids &&
 #end if
-#if $param_quoting:
-  -quoting
-  #if " " in str($param_quoting):
-    "$param_quoting"
-  #else
-    $param_quoting
-  #end if
+#if "elements_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir consensus_elements &&
 #end if
-#if $param_no_ids:
-  -no_ids
-#end if
-#if $param_feature_minimal:
-  -feature:minimal
+#if "features_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir consensus_features &&
 #end if
-#if $param_feature_add_metavalues:
-  -feature:add_metavalues $param_feature_add_metavalues
-#end if
-#if $param_id_proteins_only:
-  -id:proteins_only
+
+## 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)'
+#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -out
+  'out/output.${gxy2omsext("csv")}'
 #end if
-#if $param_id_peptides_only:
-  -id:peptides_only
-#end if
-#if $param_id_first_dim_rt:
-  -id:first_dim_rt
-#end if
-#if $param_id_add_metavalues:
-  -id:add_metavalues $param_id_add_metavalues
+#if "centroids_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -consensus:centroids
+  'consensus_centroids/output.${gxy2omsext("csv")}'
 #end if
-#if $param_id_add_hit_metavalues:
-  -id:add_hit_metavalues $param_id_add_hit_metavalues
-#end if
-#if $param_consensus_centroids:
-  -consensus:centroids $param_consensus_centroids
+#if "elements_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -consensus:elements
+  'consensus_elements/output.${gxy2omsext("csv")}'
 #end if
-#if $param_consensus_elements:
-  -consensus:elements $param_consensus_elements
-#end if
-#if $param_consensus_features:
-  -consensus:features $param_consensus_features
+#if "features_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -consensus:features
+  'consensus_features/output.${gxy2omsext("csv")}'
 #end if
-#if $param_consensus_sorting_method:
-  -consensus:sorting_method
-  #if " " in str($param_consensus_sorting_method):
-    "$param_consensus_sorting_method"
-  #else
-    $param_consensus_sorting_method
-  #end if
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
 #end if
-#if $param_consensus_sort_by_maps:
-  -consensus:sort_by_maps
+
+## Postprocessing
+#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'out/output.${gxy2omsext("csv")}' '$out'
 #end if
-#if $param_consensus_sort_by_size:
-  -consensus:sort_by_size
+#if "centroids_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'consensus_centroids/output.${gxy2omsext("csv")}' '$consensus_centroids'
 #end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
+#if "elements_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'consensus_elements/output.${gxy2omsext("csv")}' '$consensus_elements'
+#end if
+#if "features_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'consensus_features/output.${gxy2omsext("csv")}' '$consensus_features'
 #end if
-#end if
-]]></command>
+#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[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
   <inputs>
-    <param name="param_in" type="data" format="featurexml,consensusxml,idxml,mzml" optional="False" label="Input file" help="(-in) "/>
-    <param name="param_separator" type="text" size="30" label="The used separator character(s); if not set the 'tab' character is used" help="(-separator) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="in" argument="-in" type="data" format="consensusxml,featurexml,idxml,mzml" optional="false" label="Input file" help=" select consensusxml,featurexml,idxml,mzml data sets(s)"/>
+    <param name="separator" argument="-separator" type="text" optional="true" value="" label="The used separator character(s); if not set the 'tab' character is used" help="">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_replacement" type="text" size="30" value="_" label="Used to replace occurrences of the separator in strings before writing, if 'quoting' is 'none'" help="(-replacement) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="replacement" argument="-replacement" type="text" optional="true" value="_" label="Used to replace occurrences of the separator in strings before writing, if 'quoting' is 'none'" help="">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_quoting" display="radio" type="select" optional="False" value="none" label="Method for quoting of strings: 'none' for no quoting, 'double' for quoting with doubling of embedded quotes, &lt;br&gt;'escape' for quoting with backslash-escaping of embedded quotes" help="(-quoting) ">
+    <param name="quoting" argument="-quoting" display="radio" type="select" optional="false" label="Method for quoting of strings: 'none' for no quoting, 'double' for quoting with doubling of embedded quotes" help="'escape' for quoting with backslash-escaping of embedded quotes">
       <option value="none" selected="true">none</option>
       <option value="double">double</option>
       <option value="escape">escape</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_no_ids" display="radio" type="boolean" truevalue="-no_ids" falsevalue="" checked="false" optional="True" label="Suppresses output of identification data" help="(-no_ids) "/>
-    <param name="param_feature_minimal" display="radio" type="boolean" truevalue="-feature:minimal" falsevalue="" checked="false" optional="True" label="Set this flag to write only three attributes: RT, m/z, and intensity" help="(-minimal) "/>
-    <param name="param_feature_add_metavalues" type="integer" min="-1" max="100" optional="True" value="-1" label="Add columns for meta values which occur with a certain frequency (0-100%)" help="(-add_metavalues) Set to -1 to omit meta values (default)"/>
-    <param name="param_id_proteins_only" display="radio" type="boolean" truevalue="-id:proteins_only" falsevalue="" checked="false" optional="True" label="Set this flag if you want only protein information from an idXML file" help="(-proteins_only) "/>
-    <param name="param_id_peptides_only" display="radio" type="boolean" truevalue="-id:peptides_only" falsevalue="" checked="false" optional="True" label="Set this flag if you want only peptide information from an idXML file" help="(-peptides_only) "/>
-    <param name="param_id_first_dim_rt" display="radio" type="boolean" truevalue="-id:first_dim_rt" falsevalue="" checked="false" optional="True" label="If this flag is set the first_dim RT of the peptide hits will also be printed (if present)" help="(-first_dim_rt) "/>
-    <param name="param_id_add_metavalues" type="integer" min="-1" max="100" optional="True" value="-1" label="Add columns for meta values which occur with a certain frequency (0-100%)" help="(-add_metavalues) Set to -1 to omit meta values (default)"/>
-    <param name="param_id_add_hit_metavalues" type="integer" min="-1" max="100" optional="True" value="-1" label="Add columns for meta values which occur with a certain frequency (0-100%)" help="(-add_hit_metavalues) Set to -1 to omit meta values (default)"/>
-    <param name="param_consensus_sorting_method" type="select" optional="False" value="none" label="Sorting options can be combined" help="(-sorting_method) The precedence is: sort_by_size, sort_by_maps, sorting_method">
-      <option value="none" selected="true">none</option>
-      <option value="RT">RT</option>
-      <option value="MZ">MZ</option>
-      <option value="RT_then_MZ">RT_then_MZ</option>
-      <option value="intensity">intensity</option>
-      <option value="quality_decreasing">quality_decreasing</option>
-      <option value="quality_increasing">quality_increasing</option>
+    <param name="no_ids" argument="-no_ids" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Suppresses output of identification data" help=""/>
+    <section name="feature" title="Options for featureXML input files" help="" expanded="false">
+      <param name="minimal" argument="-feature:minimal" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Set this flag to write only three attributes: RT, m/z, and intensity" help=""/>
+      <param name="add_metavalues" argument="-feature:add_metavalues" type="integer" optional="true" min="-1" max="100" value="-1" label="Add columns for meta values which occur with a certain frequency (0-100%)" help="Set to -1 to omit meta values (default)"/>
+    </section>
+    <section name="id" title="Options for idXML input files" help="" expanded="false">
+      <param name="proteins_only" argument="-id:proteins_only" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Set this flag if you want only protein information from an idXML file" help=""/>
+      <param name="peptides_only" argument="-id:peptides_only" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Set this flag if you want only peptide information from an idXML file" help=""/>
+      <param name="protein_groups" argument="-id:protein_groups" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Set this flag if you want to also write indist" help="group information from an idXML file"/>
+      <param name="first_dim_rt" argument="-id:first_dim_rt" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If this flag is set the first_dim RT of the peptide hits will also be printed (if present)" help=""/>
+      <param name="add_metavalues" argument="-id:add_metavalues" type="integer" optional="true" min="-1" max="100" value="-1" label="Add columns for meta values of PeptideID (=spectrum) entries which occur with a certain frequency (0-100%)" help="Set to -1 to omit meta values (default)"/>
+      <param name="add_hit_metavalues" argument="-id:add_hit_metavalues" type="integer" optional="true" min="-1" max="100" value="-1" label="Add columns for meta values of PeptideHit (=PSM) entries which occur with a certain frequency (0-100%)" help="Set to -1 to omit meta values (default)"/>
+      <param name="add_protein_hit_metavalues" argument="-id:add_protein_hit_metavalues" type="integer" optional="true" min="-1" max="100" value="-1" label="Add columns for meta values on protein level which occur with a certain frequency (0-100%)" help="Set to -1 to omit meta values (default)"/>
+    </section>
+    <section name="consensus" title="Options for consensusXML input files" help="" expanded="false">
+      <param name="sorting_method" argument="-consensus:sorting_method" type="select" optional="false" label="Sorting options can be combined" help="The precedence is: sort_by_size, sort_by_maps, sorting_method">
+        <option value="none" selected="true">none</option>
+        <option value="RT">RT</option>
+        <option value="MZ">MZ</option>
+        <option value="RT_then_MZ">RT_then_MZ</option>
+        <option value="intensity">intensity</option>
+        <option value="quality_decreasing">quality_decreasing</option>
+        <option value="quality_increasing">quality_increasing</option>
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="sort_by_maps" argument="-consensus:sort_by_maps" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Apply a stable sort by the covered maps, lexicographically" help=""/>
+      <param name="sort_by_size" argument="-consensus:sort_by_size" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Apply a stable sort by decreasing size" help="(i.e., the number of elements)"/>
+    </section>
+    <expand macro="adv_opts_macro">
+      <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>
+    </expand>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="false">
+      <option value="out_FLAG">out (Apply a stable sort by decreasing size)</option>
+      <option value="centroids_FLAG">centroids (Apply a stable sort by decreasing size)</option>
+      <option value="elements_FLAG">elements (Apply a stable sort by decreasing size)</option>
+      <option value="features_FLAG">features (Apply a stable sort by decreasing size)</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_consensus_sort_by_maps" display="radio" type="boolean" truevalue="-consensus:sort_by_maps" falsevalue="" checked="false" optional="True" label="Apply a stable sort by the covered maps, lexicographically" help="(-sort_by_maps) "/>
-    <param name="param_consensus_sort_by_size" display="radio" type="boolean" truevalue="-consensus:sort_by_size" falsevalue="" checked="false" optional="True" label="Apply a stable sort by decreasing size (i.e., the number of elements)" help="(-sort_by_size) "/>
-    <expand macro="advanced_options">
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
-    </expand>
   </inputs>
   <outputs>
-    <data name="param_out" format="tabular"/>
-    <data name="param_consensus_centroids" format="tabular"/>
-    <data name="param_consensus_elements" format="tabular"/>
-    <data name="param_consensus_features" format="tabular"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "out_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="consensus_centroids" label="${tool.name} on ${on_string}: consensus:centroids" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "centroids_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="consensus_elements" label="${tool.name} on ${on_string}: consensus:elements" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "elements_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="consensus_features" label="${tool.name} on ${on_string}: consensus:features" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "features_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="stdout" format="txt" label="${tool.name} on ${on_string}: stdout">
+      <filter>OPTIONAL_OUTPUTS is None</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>
-  <help>Exports various XML formats to a text file.
+  <tests>
+    <expand macro="autotest_TextExporter"/>
+    <expand macro="manutest_TextExporter"/>
+  </tests>
+  <help><![CDATA[Exports various XML formats to a text file.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_TextExporter.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_TextExporter.html]]></help>
+  <expand macro="references"/>
 </tool>