diff OpenSwathDIAPreScoring.xml @ 9:e6ba7a995b35 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 55a2aeba8bfd8a6910630721de9857dcdfe05d3c"
author galaxyp
date Tue, 13 Oct 2020 20:25:20 +0000
parents 9bf5470fb0bc
children c99d5004b74f
line wrap: on
line diff
--- a/OpenSwathDIAPreScoring.xml	Fri May 17 10:08:23 2019 -0400
+++ b/OpenSwathDIAPreScoring.xml	Tue Oct 13 20:25:20 2020 +0000
@@ -1,56 +1,78 @@
 <?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: [Targeted Experiments]-->
-<tool id="OpenSwathDIAPreScoring" name="OpenSwathDIAPreScoring" version="2.3.0">
+<tool id="OpenSwathDIAPreScoring" name="OpenSwathDIAPreScoring" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Scoring spectra using the DIA scores.</description>
   <macros>
     <token name="@EXECUTABLE@">OpenSwathDIAPreScoring</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[OpenSwathDIAPreScoring
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_tr:
-  -tr $param_tr
-#end if
-#if $param_out:
-  -out $param_out
-#end if
+## Preprocessing
+mkdir tr &&
+ln -s '$tr' 'tr/${re.sub("[^\w\-_]", "_", $tr.element_identifier)}.$gxy2omsext($tr.ext)' &&
+mkdir swath_files &&
+${ ' '.join(["ln -s '%s' 'swath_files/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $swath_files if _]) }
+mkdir output_files &&
+
+## 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
+-tr
+'tr/${re.sub("[^\w\-_]", "_", $tr.element_identifier)}.$gxy2omsext($tr.ext)'
 -swath_files
-  #for token in $param_swath_files:
-    $token
-  #end for
-#if $param_min_upper_edge_dist:
-  -min_upper_edge_dist $param_min_upper_edge_dist
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+${' '.join(["'swath_files/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $swath_files if _])}
+-output_files
+${' '.join(["'output_files/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext("tabular")) for _ in $swath_files if _])}
+
+## Postprocessing
+${' '.join(["&& mv -n 'swath_files/%(id)s.%(gext)s' 'output_files/%(id)s'"%{"id": re.sub('[^\w\-_]', '_', _.element_identifier), "gext": $gxy2omsext("tabular")} for _ in $output_files if _])}
+#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_tr" type="data" format="traml" optional="False" label="transition file" help="(-tr) "/>
-    <param name="param_swath_files" type="data" format="mzml" multiple="true" optional="True" size="30" label="Swath files that were used to extract the transitions" help="(-swath_files) If present, SWATH specific scoring will be applied">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="tr" argument="-tr" type="data" format="traml" optional="false" label="transition file" help=" select traml data sets(s)"/>
+    <param name="swath_files" argument="-swath_files" type="data" format="mzml" multiple="true" optional="false" label="Swath files that were used to extract the transitions" help="If present, SWATH specific scoring will be applied select mzml data sets(s)"/>
+    <param name="min_upper_edge_dist" argument="-min_upper_edge_dist" type="float" optional="true" value="0.0" label="Minimal distance to the edge to still consider a precursor, in Thomson (only in SWATH)" help=""/>
+    <expand macro="adv_opts_macro">
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overrides 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" optional="true" multiple="true" label="Optional outputs">
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_min_upper_edge_dist" type="float" value="0.0" label="Minimal distance to the edge to still consider a precursor, in Thomson (only in SWATH)" help="(-min_upper_edge_dist) "/>
-    <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"/>
+    <collection type="list" name="output_files" label="${tool.name} on ${on_string}: output_files">
+      <discover_datasets directory="output_files" format="tabular" pattern="__name__"/>
+    </collection>
+    <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>Scoring spectra using the DIA scores.
+  <tests>
+    <expand macro="autotest_OpenSwathDIAPreScoring"/>
+    <expand macro="manutest_OpenSwathDIAPreScoring"/>
+  </tests>
+  <help><![CDATA[Scoring spectra using the DIA scores.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/UTILS_OpenSwathDIAPreScoring.html</help>
+For more information, visit http://www.openms.de/doxygen/release/2.6.0/html/UTILS_OpenSwathDIAPreScoring.html]]></help>
+  <expand macro="references"/>
 </tool>