diff MaRaClusterAdapter.xml @ 4:f7195ee7e18d draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author galaxyp
date Thu, 01 Dec 2022 19:14:16 +0000
parents 2be8c63444db
children
line wrap: on
line diff
--- a/MaRaClusterAdapter.xml	Fri Nov 06 19:47:57 2020 +0000
+++ b/MaRaClusterAdapter.xml	Thu Dec 01 19:14:16 2022 +0000
@@ -1,13 +1,11 @@
 <?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: [ID Processing]-->
-<tool id="MaRaClusterAdapter" name="MaRaClusterAdapter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
+<tool id="MaRaClusterAdapter" name="MaRaClusterAdapter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
   <description>Facilitate input to MaRaCluster and reintegrate.</description>
   <macros>
     <token name="@EXECUTABLE@">MaRaClusterAdapter</token>
     <import>macros.xml</import>
-    <import>macros_autotest.xml</import>
-    <import>macros_test.xml</import>
   </macros>
   <expand macro="requirements"/>
   <expand macro="stdio"/>
@@ -16,11 +14,21 @@
 #import re
 
 ## Preprocessing
-mkdir in &&
-${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
-#if $id_in:
-  mkdir id_in &&
-  ${ ' '.join(["ln -s '%s' 'id_in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $id_in if _]) }
+mkdir in_cond.in &&
+#if $in_cond.in_select == "no"
+mkdir ${' '.join(["'in_cond.in/%s'" % (i) for i, f in enumerate($in_cond.in) if f])} && 
+${' '.join(["ln -s '%s' 'in_cond.in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_cond.in) if f])}
+#else
+ln -s '$in_cond.in' 'in_cond.in/${re.sub("[^\w\-_]", "_", $in_cond.in.element_identifier)}.$gxy2omsext($in_cond.in.ext)' &&
+#end if
+#if $id_in_cond.id_in:
+  mkdir id_in_cond.id_in &&
+  #if $id_in_cond.id_in_select == "no"
+  mkdir ${' '.join(["'id_in_cond.id_in/%s'" % (i) for i, f in enumerate($id_in_cond.id_in) if f])} && 
+  ${' '.join(["ln -s '%s' 'id_in_cond.id_in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($id_in_cond.id_in) if f])}
+  #else
+  ln -s '$id_in_cond.id_in' 'id_in_cond.id_in/${re.sub("[^\w\-_]", "_", $id_in_cond.id_in.element_identifier)}.$gxy2omsext($id_in_cond.id_in.ext)' &&
+  #end if
 #end if
 #if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
   mkdir out &&
@@ -33,10 +41,18 @@
 python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
 @EXECUTABLE@ -ini @EXECUTABLE@.ctd
 -in
-${' '.join(["'in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _])}
-#if $id_in:
+#if $in_cond.in_select == "no"
+${' '.join(["'in_cond.in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_cond.in) if f])}
+#else
+'in_cond.in/${re.sub("[^\w\-_]", "_", $in_cond.in.element_identifier)}.$gxy2omsext($in_cond.in.ext)'
+#end if
+#if $id_in_cond.id_in:
   -id_in
-  ${' '.join(["'id_in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $id_in if _])}
+  #if $id_in_cond.id_in_select == "no"
+  ${' '.join(["'id_in_cond.id_in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($id_in_cond.id_in) if f])}
+  #else
+  'id_in_cond.id_in/${re.sub("[^\w\-_]", "_", $id_in_cond.id_in.element_identifier)}.$gxy2omsext($id_in_cond.id_in.ext)'
+  #end if
 #end if
 #if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
   -out
@@ -58,21 +74,43 @@
     <configfile name="hardcoded_json"><![CDATA[{"maracluster_executable": "/home/berntm/projects/tools-galaxyp/tools/openms/OpenMS2.5.0-git/THIRDPARTY/Linux/64bit/MaRaCluster/maracluster", "log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
   </configfiles>
   <inputs>
-    <param name="in" argument="-in" type="data" format="mgf,mzml" multiple="true" optional="false" label="Input file(s)" help=" select mgf,mzml data sets(s)"/>
-    <param name="id_in" argument="-id_in" type="data" format="idxml" multiple="true" optional="true" label="Optional idXML Input file(s) in the same order as mzML files - for Maracluster Cluster annotation" help=" select idxml data sets(s)"/>
-    <param name="pcut" argument="-pcut" type="float" optional="true" max="0.0" value="-10.0" label="log(p-value) cutoff, has to be &lt; 0.0" help="Default: -10.0"/>
-    <param name="min_cluster_size" argument="-min_cluster_size" type="integer" optional="true" min="1" value="1" label="minimum number of spectra in a cluster for consensus spectra" help=""/>
+    <conditional name="in_cond">
+      <param name="in_select" type="select" label="Run tool in batch mode for -in">
+        <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" type="data" format="mgf,mzml" multiple="true" optional="false" label="Input file(s)" help=" select mgf,mzml data sets(s)"/>
+      </when>
+      <when value="yes">
+        <param argument="-in" type="data" format="mgf,mzml" multiple="false" optional="false" label="Input file(s)" help=" select mgf,mzml data sets(s)"/>
+      </when>
+    </conditional>
+    <conditional name="id_in_cond">
+      <param name="id_in_select" type="select" label="Run tool in batch mode for -id_in">
+        <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="-id_in" type="data" format="idxml" multiple="true" optional="true" label="Optional idXML Input file(s) in the same order as mzML files - for Maracluster Cluster annotation" help=" select idxml data sets(s)"/>
+      </when>
+      <when value="yes">
+        <param argument="-id_in" type="data" format="idxml" multiple="false" optional="true" label="Optional idXML Input file(s) in the same order as mzML files - for Maracluster Cluster annotation" help=" select idxml data sets(s)"/>
+      </when>
+    </conditional>
+    <param argument="-pcut" type="float" optional="true" max="0.0" value="-10.0" label="log(p-value) cutoff, has to be &lt; 0.0" help="Default: -10.0"/>
+    <param argument="-min_cluster_size" type="integer" optional="true" min="1" value="1" label="minimum number of spectra in a cluster for consensus spectra" help=""/>
     <expand macro="adv_opts_macro">
-      <param name="verbose" argument="-verbose" type="integer" optional="true" value="2" label="Set verbosity of output: 0=no processing info, 5=all" help=""/>
-      <param name="precursor_tolerance" argument="-precursor_tolerance" type="float" optional="true" value="20.0" label="Precursor monoisotopic mass tolerance" help=""/>
-      <param name="precursor_tolerance_units" argument="-precursor_tolerance_units" display="radio" type="select" optional="false" label="tolerance_mass_units 0=ppm, 1=Da" help="">
+      <param argument="-verbose" type="integer" optional="true" value="2" label="Set verbosity of output: 0=no processing info, 5=all" help=""/>
+      <param argument="-precursor_tolerance" type="float" optional="true" value="20.0" label="Precursor monoisotopic mass tolerance" help=""/>
+      <param argument="-precursor_tolerance_units" type="select" optional="true" label="tolerance_mass_units 0=ppm, 1=Da" help="">
         <option value="ppm" selected="true">ppm</option>
         <option value="Da">Da</option>
-        <expand macro="list_string_san"/>
+        <expand macro="list_string_san" name="precursor_tolerance_units"/>
       </param>
-      <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 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="">
+        <expand macro="list_string_san" name="test"/>
       </param>
     </expand>
     <param name="OPTIONAL_OUTPUTS" type="select" optional="true" multiple="true" label="Optional outputs">
@@ -91,13 +129,11 @@
       <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
     </data>
   </outputs>
-  <tests>
-    <expand macro="autotest_MaRaClusterAdapter"/>
-    <expand macro="manutest_MaRaClusterAdapter"/>
+  <tests><!-- TOPP_MaRaClusterAdapter_2 -->
   </tests>
   <help><![CDATA[Facilitate input to MaRaCluster and reintegrate.
 
 
-For more information, visit http://www.openms.de/doxygen/release/2.6.0/html/TOPP_MaRaClusterAdapter.html]]></help>
+For more information, visit http://www.openms.de/doxygen/release/2.8.0/html/TOPP_MaRaClusterAdapter.html]]></help>
   <expand macro="references"/>
 </tool>