diff CVInspector.xml @ 13:3b585b370ab8 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 20:14:44 +0000
parents 8a11c915c25b
children 53695d887eaa
line wrap: on
line diff
--- a/CVInspector.xml	Fri May 17 09:58:29 2019 -0400
+++ b/CVInspector.xml	Wed Sep 09 20:14:44 2020 +0000
@@ -1,94 +1,102 @@
 <?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: [Utilities]-->
-<tool id="CVInspector" name="CVInspector" version="2.3.0">
+<tool id="CVInspector" name="CVInspector" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>A tool for visualization and validation of PSI mapping and CV files.</description>
   <macros>
     <token name="@EXECUTABLE@">CVInspector</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[CVInspector
-
--cv_files
-  #for token in $param_cv_files:
-    $token
-  #end for
+  <expand macro="stdio"/>
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $rep_param_cv_names:
--cv_names
-  #for token in $rep_param_cv_names:
-    #if " " in str(token):
-      "$token.param_cv_names"
-    #else
-      $token.param_cv_names
-    #end if
-  #end for
+## Preprocessing
+mkdir cv_files &&
+${ ' '.join(["ln -s '%s' 'cv_files/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $cv_files if _]) }
+#if $mapping_file:
+  mkdir mapping_file &&
+  ln -s '$mapping_file' 'mapping_file/${re.sub("[^\w\-_]", "_", $mapping_file.element_identifier)}.$gxy2omsext($mapping_file.ext)' &&
+#end if
+#if "html_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir html &&
 #end if
-#if $param_mapping_file:
-  -mapping_file $param_mapping_file
+
+## 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
+-cv_files
+${' '.join(["'cv_files/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $cv_files if _])}
+#if $mapping_file:
+  -mapping_file
+  'mapping_file/${re.sub("[^\w\-_]", "_", $mapping_file.element_identifier)}.$gxy2omsext($mapping_file.ext)'
+#end if
+#if "html_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -html
+  'html/output.${gxy2omsext("html")}'
+#end if
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
 #end if
 
-#if $rep_param_ignore_cv:
--ignore_cv
-  #for token in $rep_param_ignore_cv:
-    #if " " in str(token):
-      "$token.param_ignore_cv"
-    #else
-      $token.param_ignore_cv
-    #end if
-  #end for
+## Postprocessing
+#if "html_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'html/output.${gxy2omsext("html")}' '$html'
 #end if
-#if $param_html:
-  -html $param_html
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#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_cv_files" type="data" format="obo" multiple="true" optional="False" size="30" label="List of ontology files in OBO format" help="(-cv_files) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="cv_files" argument="-cv_files" type="data" format="obo" multiple="true" optional="false" label="List of ontology files in OBO format" help=" select obo data sets(s)"/>
+    <param name="cv_names" argument="-cv_names" type="text" optional="false" value="" label="List of identifiers (one for each ontology file)" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
+      <expand macro="list_string_val"/>
+      <expand macro="list_string_san"/>
+    </param>
+    <param name="mapping_file" argument="-mapping_file" type="data" format="xml" optional="true" label="Mapping file in CVMapping (XML) format" help=" select xml data sets(s)"/>
+    <param name="ignore_cv" argument="-ignore_cv" type="text" optional="true" value="UO PATO BTO" label="A list of CV identifiers which should be ignored" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
+      <expand macro="list_string_val"/>
+      <expand macro="list_string_san"/>
     </param>
-    <repeat name="rep_param_cv_names" min="1" title="param_cv_names">
-      <param name="param_cv_names" type="text" size="30" label="List of identifiers (one for each ontology file)" help="(-cv_names) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
+    <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>
-    </repeat>
-    <param name="param_mapping_file" type="data" format="xml" optional="True" label="Mapping file in CVMapping (XML) format" help="(-mapping_file) "/>
-    <repeat name="rep_param_ignore_cv" min="0" max="1" title="param_ignore_cv">
-      <param name="param_ignore_cv" type="text" size="30" value="UO PATO BTO" label="A list of CV identifiers which should be ignored" help="(-ignore_cv) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
-      </param>
-    </repeat>
-    <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>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="false">
+      <option value="html_FLAG">html (Enables the test mode (needed for internal use only))</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
   </inputs>
   <outputs>
-    <data name="param_html" format="html"/>
+    <data name="html" label="${tool.name} on ${on_string}: html" format="html">
+      <filter>OPTIONAL_OUTPUTS is not None and "html_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>A tool for visualization and validation of PSI mapping and CV files.
+  <tests>
+    <expand macro="autotest_CVInspector"/>
+    <expand macro="manutest_CVInspector"/>
+  </tests>
+  <help><![CDATA[A tool for visualization and validation of PSI mapping and CV files.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/UTILS_CVInspector.html</help>
+For more information, visit http://www.openms.de/documentation/UTILS_CVInspector.html]]></help>
+  <expand macro="references"/>
 </tool>