diff ProteinResolver.xml @ 9:814d6f4706e3 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:51:43 +0000
parents 6cf5aa34e245
children 95f90fab5ce8
line wrap: on
line diff
--- a/ProteinResolver.xml	Fri May 17 09:42:36 2019 -0400
+++ b/ProteinResolver.xml	Wed Sep 09 12:51:43 2020 +0000
@@ -1,134 +1,171 @@
 <?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: [Quantitation]-->
-<tool id="ProteinResolver" name="ProteinResolver" version="2.3.0">
+<tool id="ProteinResolver" name="ProteinResolver" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>protein inference</description>
   <macros>
     <token name="@EXECUTABLE@">ProteinResolver</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[ProteinResolver
+  <expand macro="stdio"/>
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_fasta:
-  -fasta $param_fasta
+## Preprocessing
+mkdir fasta &&
+ln -s '$fasta' 'fasta/${re.sub("[^\w\-_]", "_", $fasta.element_identifier)}.$gxy2omsext($fasta.ext)' &&
+#if $in:
+  mkdir in &&
+  ${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
 #end if
--in
-  #for token in $param_in:
-    $token
-  #end for
-#if $param_in_path:
-  -in_path     "$param_in_path"
+#if $design:
+  mkdir design &&
+  ln -s '$design' 'design/${re.sub("[^\w\-_]", "_", $design.element_identifier)}.$gxy2omsext($design.ext)' &&
+#end if
+#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir protein_groups &&
 #end if
-#if $param_design:
-  -design $param_design
+#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir peptide_table &&
 #end if
-#if $param_protein_groups:
-  -protein_groups $param_protein_groups
+#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir protein_table &&
 #end if
-#if $param_peptide_table:
-  -peptide_table $param_peptide_table
+#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir additional_info &&
 #end if
-#if $param_protein_table:
-  -protein_table $param_protein_table
-#end if
-#if $param_additional_info:
-  -additional_info $param_additional_info
-#end if
-#if $param_resolver_missed_cleavages:
-  -resolver:missed_cleavages $param_resolver_missed_cleavages
-#end if
-#if $param_resolver_min_length:
-  -resolver:min_length $param_resolver_min_length
+
+## 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
+-fasta
+'fasta/${re.sub("[^\w\-_]", "_", $fasta.element_identifier)}.$gxy2omsext($fasta.ext)'
+#if $in:
+  -in
+  ${' '.join(["'in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _])}
 #end if
-#if $param_resolver_enzyme:
-  -resolver:enzyme
-  #if " " in str($param_resolver_enzyme):
-    "$param_resolver_enzyme"
-  #else
-    $param_resolver_enzyme
-  #end if
+#if $design:
+  -design
+  'design/${re.sub("[^\w\-_]", "_", $design.element_identifier)}.$gxy2omsext($design.ext)'
+#end if
+#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -protein_groups
+  'protein_groups/output.${gxy2omsext("csv")}'
 #end if
-#if $param_designer_experiment:
-  -designer:experiment     "$param_designer_experiment"
+#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -peptide_table
+  'peptide_table/output.${gxy2omsext("csv")}'
 #end if
-#if $param_designer_file:
-  -designer:file     "$param_designer_file"
+#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -protein_table
+  'protein_table/output.${gxy2omsext("csv")}'
+#end if
+#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -additional_info
+  'additional_info/output.${gxy2omsext("csv")}'
 #end if
-#if $param_designer_separator:
-  -designer:separator
-  #if " " in str($param_designer_separator):
-    "$param_designer_separator"
-  #else
-    $param_designer_separator
-  #end if
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
+#end if
+
+## Postprocessing
+#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'protein_groups/output.${gxy2omsext("csv")}' '$protein_groups'
+#end if
+#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'peptide_table/output.${gxy2omsext("csv")}' '$peptide_table'
 #end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
+#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'protein_table/output.${gxy2omsext("csv")}' '$protein_table'
+#end if
+#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'additional_info/output.${gxy2omsext("csv")}' '$additional_info'
 #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_fasta" type="data" format="fasta" optional="False" label="Input database file" help="(-fasta) "/>
-    <param name="param_in" type="data" format="idxml,consensusxml" multiple="true" optional="True" size="30" label="Input file(s) holding experimental data" help="(-in) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
-    </param>
-    <param name="param_in_path" type="text" size="30" label="Path to idXMLs or consensusXMLs files" help="(-in_path) Ignored if 'in' is given">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="fasta" argument="-fasta" type="data" format="fasta" optional="false" label="Input database file" help=" select fasta data sets(s)"/>
+    <param name="in" argument="-in" type="data" format="consensusxml,idxml" multiple="true" optional="true" label="Input file(s) holding experimental data" help=" select consensusxml,idxml data sets(s)"/>
+    <param name="in_path" argument="-in_path" type="text" optional="true" value="" label="Path to idXMLs or consensusXMLs files" help="Ignored if 'in' is given">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_design" type="data" format="txt" optional="True" label="Text file containing the experimental design" help="(-design) See documentation for specific format requirements"/>
-    <param name="param_resolver_missed_cleavages" type="integer" min="0" optional="True" value="2" label="Number of allowed missed cleavages" help="(-missed_cleavages) "/>
-    <param name="param_resolver_min_length" type="integer" min="1" optional="True" value="6" label="Minimum length of peptide" help="(-min_length) "/>
-    <param name="param_resolver_enzyme" display="radio" type="select" optional="False" value="Trypsin" label="Digestion enzyme" help="(-enzyme) ">
-      <option value="Trypsin" selected="true">Trypsin</option>
-    </param>
-    <param name="param_designer_experiment" type="text" size="30" value="ExperimentalSetting" label="Identifier for the experimental design" help="(-experiment) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="design" argument="-design" type="data" format="txt" optional="true" label="Text file containing the experimental design" help="See documentation for specific format requirements select txt data sets(s)"/>
+    <section name="resolver" title="Additional options for algorithm" help="" expanded="false">
+      <param name="missed_cleavages" argument="-resolver:missed_cleavages" type="integer" optional="true" min="0" value="2" label="Number of allowed missed cleavages" help=""/>
+      <param name="min_length" argument="-resolver:min_length" type="integer" optional="true" min="1" value="6" label="Minimum length of peptide" help=""/>
+      <param name="enzyme" argument="-resolver:enzyme" display="radio" type="select" optional="false" label="Digestion enzyme" help="">
+        <option value="Trypsin" selected="true">Trypsin</option>
+        <expand macro="list_string_san"/>
+      </param>
+    </section>
+    <section name="designer" title="Additional options for quantitative experimental design" help="" expanded="false">
+      <param name="experiment" argument="-designer:experiment" type="text" optional="true" value="ExperimentalSetting" label="Identifier for the experimental design" help="">
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="file" argument="-designer:file" type="text" optional="true" value="File" label="Identifier for the file name" help="">
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="separator" argument="-designer:separator" display="radio" type="select" optional="false" label="Separator, which should be used to split a row into columns" help="">
+        <option value="tab" selected="true">tab</option>
+        <option value="semi-colon">semi-colon</option>
+        <option value="comma">comma</option>
+        <option value="whitespace">whitespace</option>
+        <expand macro="list_string_san"/>
+      </param>
+    </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="protein_groups_FLAG">protein_groups (Separator, which should be used to split a row into columns)</option>
+      <option value="peptide_table_FLAG">peptide_table (Separator, which should be used to split a row into columns)</option>
+      <option value="protein_table_FLAG">protein_table (Separator, which should be used to split a row into columns)</option>
+      <option value="additional_info_FLAG">additional_info (Separator, which should be used to split a row into columns)</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_designer_file" type="text" size="30" value="File" label="Identifier for the file name" help="(-file) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
-    </param>
-    <param name="param_designer_separator" display="radio" type="select" optional="False" value="tab" label="Separator, which should be used to split a row into columns" help="(-separator) ">
-      <option value="tab" selected="true">tab</option>
-      <option value="semi-colon">semi-colon</option>
-      <option value="comma">comma</option>
-      <option value="whitespace">whitespace</option>
-    </param>
-    <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_protein_groups" format="tabular"/>
-    <data name="param_peptide_table" format="tabular"/>
-    <data name="param_protein_table" format="tabular"/>
-    <data name="param_additional_info" format="tabular"/>
+    <data name="protein_groups" label="${tool.name} on ${on_string}: protein_groups" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "protein_groups_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="peptide_table" label="${tool.name} on ${on_string}: peptide_table" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "peptide_table_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="protein_table" label="${tool.name} on ${on_string}: protein_table" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "protein_table_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <data name="additional_info" label="${tool.name} on ${on_string}: additional_info" format="csv">
+      <filter>OPTIONAL_OUTPUTS is not None and "additional_info_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>protein inference
+  <tests>
+    <expand macro="autotest_ProteinResolver"/>
+    <expand macro="manutest_ProteinResolver"/>
+  </tests>
+  <help><![CDATA[protein inference
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_ProteinResolver.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_ProteinResolver.html]]></help>
+  <expand macro="references"/>
 </tool>