diff ConsensusID.xml @ 13:fdc984e79f40 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:43:01 -0400
parents 368221d85573
children feebe2054e40
line wrap: on
line diff
--- a/ConsensusID.xml	Fri May 17 10:09:43 2019 -0400
+++ b/ConsensusID.xml	Thu Aug 27 19:43:01 2020 -0400
@@ -1,100 +1,98 @@
 <?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="ConsensusID" name="ConsensusID" version="2.3.0">
+<tool id="ConsensusID" name="ConsensusID" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Computes a consensus of peptide identifications of several identification engines.</description>
   <macros>
     <token name="@EXECUTABLE@">ConsensusID</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[ConsensusID
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
+
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
+
+## Main program call
 
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_rt_delta:
-  -rt_delta $param_rt_delta
-#end if
-#if $param_mz_delta:
-  -mz_delta $param_mz_delta
-#end if
-#if $param_algorithm:
-  -algorithm
-  #if " " in str($param_algorithm):
-    "$param_algorithm"
-  #else
-    $param_algorithm
-  #end if
-#end if
-#if $param_filter_considered_hits:
-  -filter:considered_hits $param_filter_considered_hits
-#end if
-#if $param_filter_min_support:
-  -filter:min_support $param_filter_min_support
-#end if
-#if $param_filter_count_empty:
-  -filter:count_empty
-#end if
-#if $param_PEPIons_mass_tolerance:
-  -PEPIons:mass_tolerance $param_PEPIons_mass_tolerance
-#end if
-#if $param_PEPIons_min_shared:
-  -PEPIons:min_shared $param_PEPIons_min_shared
-#end if
-#if $param_PEPMatrix_matrix:
-  -PEPMatrix:matrix
-  #if " " in str($param_PEPMatrix_matrix):
-    "$param_PEPMatrix_matrix"
-  #else
-    $param_PEPMatrix_matrix
-  #end if
-#end if
-#if $param_PEPMatrix_penalty:
-  -PEPMatrix:penalty $param_PEPMatrix_penalty
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+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)'
+-out
+'out/output.${in.ext}'
+
+## Postprocessing
+&& mv 'out/output.${in.ext}' '$out'
+#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="idxml,featurexml,consensusxml" optional="False" label="input file" help="(-in) "/>
-    <param name="param_rt_delta" type="float" min="0.0" optional="True" value="0.1" label="[idXML input only] Maximum allowed retention time deviation between identifications belonging to the same spectrum" help="(-rt_delta) "/>
-    <param name="param_mz_delta" type="float" min="0.0" optional="True" value="0.1" label="[idXML input only] Maximum allowed precursor m/z deviation between identifications belonging to the same spectrum" help="(-mz_delta) "/>
-    <param name="param_algorithm" type="select" optional="False" value="PEPMatrix" label="Algorithm used for consensus scoring" help="(-algorithm) &lt;br&gt;* PEPMatrix: Scoring based on posterior error probabilities (PEPs) and peptide sequence similarities (scored by a substitution matrix). Requires PEPs as scores. &lt;br&gt;* PEPIons: Scoring based on posterior error probabilities (PEPs) and fragment ion similarities ('shared peak count'). Requires PEPs as scores. &lt;br&gt;* best: For each peptide ID, use the best score of any search engine as the consensus score. Requires the same score type in all ID runs. &lt;br&gt;* worst: For each peptide ID, use the worst score of any search engine as the consensus score. Requires the same score type in all ID runs. &lt;br&gt;* average:  For each peptide ID, use the average score of all search engines as the consensus. Requires the same score type in all ID runs. &lt;br&gt;* ranks: Calculates a consensus score based on the ranks of peptide IDs in the results of different search engines. The final score is in the range (0, 1], with 1 being the best score. No requirements about score types">
+    <param name="in" argument="-in" type="data" format="consensusxml,featurexml,idxml" optional="false" label="input file" help=" select consensusxml,featurexml,idxml data sets(s)"/>
+    <param name="rt_delta" argument="-rt_delta" type="float" optional="true" min="0.0" value="0.1" label="[idXML input only] Maximum allowed retention time deviation between identifications belonging to the same spectrum" help=""/>
+    <param name="mz_delta" argument="-mz_delta" type="float" optional="true" min="0.0" value="0.1" label="[idXML input only] Maximum allowed precursor m/z deviation between identifications belonging to the same spectrum" help=""/>
+    <param name="algorithm" argument="-algorithm" type="select" optional="false" label="Algorithm used for consensus scoring" help="* PEPMatrix: Scoring based on posterior error probabilities (PEPs) and peptide sequence similarities (scored by a substitution matrix). Requires PEPs as scores.. * PEPIons: Scoring based on posterior error probabilities (PEPs) and fragment ion similarities ('shared peak count'). Requires PEPs as scores.. * best: For each peptide ID, use the best score of any search engine as the consensus score. Requires the same score type in all ID runs.. * worst: For each peptide ID, use the worst score of any search engine as the consensus score. Requires the same score type in all ID runs.. * average:  For each peptide ID, use the average score of all search engines as the consensus. Requires the same score type in all ID runs.. * ranks: Calculates a consensus score based on the ranks of peptide IDs in the results of different search engines. The final score is in the range (0, 1], with 1 being the best score. No requirements about score types">
       <option value="PEPMatrix" selected="true">PEPMatrix</option>
       <option value="PEPIons">PEPIons</option>
       <option value="best">best</option>
       <option value="worst">worst</option>
       <option value="average">average</option>
       <option value="ranks">ranks</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_filter_considered_hits" type="integer" min="0" optional="True" value="0" label="The number of top hits in each ID run that are considered for consensus scoring ('0' for all hits)" help="(-considered_hits) "/>
-    <param name="param_filter_min_support" type="float" min="0.0" max="1.0" optional="True" value="0.0" label="For each peptide hit from an ID run, the fraction of other ID runs that must support that hit (otherwise it is removed)" help="(-min_support) "/>
-    <param name="param_filter_count_empty" display="radio" type="boolean" truevalue="-filter:count_empty" falsevalue="" checked="false" optional="True" label="Count empty ID runs (i.e" help="(-count_empty) those containing no peptide hit for the current spectrum) when calculating 'min_support'?"/>
-    <param name="param_PEPIons_mass_tolerance" type="float" min="0.0" optional="True" value="0.5" label="Maximum difference between fragment masses (in Da) for fragments to be considered 'shared' between peptides" help="(-mass_tolerance) "/>
-    <param name="param_PEPIons_min_shared" type="integer" min="1" optional="True" value="2" label="The minimal number of 'shared' fragments (between two suggested peptides) that is necessary to evaluate the similarity based on shared peak count (SPC)" help="(-min_shared) "/>
-    <param name="param_PEPMatrix_matrix" display="radio" type="select" optional="False" value="identity" label="Substitution matrix to use for alignment-based similarity scoring" help="(-matrix) ">
-      <option value="identity" selected="true">identity</option>
-      <option value="PAM30MS">PAM30MS</option>
+    <section name="filter" title="Options for filtering peptide hits" help="" expanded="false">
+      <param name="considered_hits" argument="-filter:considered_hits" type="integer" optional="true" min="0" value="0" label="The number of top hits in each ID run that are considered for consensus scoring ('0' for all hits)" help=""/>
+      <param name="min_support" argument="-filter:min_support" type="float" optional="true" min="0.0" max="1.0" value="0.0" label="For each peptide hit from an ID run, the fraction of other ID runs that must support that hit (otherwise it is removed)" help=""/>
+      <param name="count_empty" argument="-filter:count_empty" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Count empty ID runs" help="(i.e. those containing no peptide hit for the current spectrum) when calculating 'min_support'?"/>
+    </section>
+    <section name="PEPIons" title="PEPIons algorithm parameters" help="" expanded="false">
+      <param name="mass_tolerance" argument="-PEPIons:mass_tolerance" type="float" optional="true" min="0.0" value="0.5" label="Maximum difference between fragment masses (in Da) for fragments to be considered 'shared' between peptides" help=""/>
+      <param name="min_shared" argument="-PEPIons:min_shared" type="integer" optional="true" min="1" value="2" label="The minimal number of 'shared' fragments (between two suggested peptides) that is necessary to evaluate the similarity based on shared peak count (SPC)" help=""/>
+    </section>
+    <section name="PEPMatrix" title="PEPMatrix algorithm parameters" help="" expanded="false">
+      <param name="matrix" argument="-PEPMatrix:matrix" display="radio" type="select" optional="false" label="Substitution matrix to use for alignment-based similarity scoring" help="">
+        <option value="identity" selected="true">identity</option>
+        <option value="PAM30MS">PAM30MS</option>
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="penalty" argument="-PEPMatrix:penalty" type="integer" optional="true" min="1" value="5" label="Alignment gap penalty (the same value is used for gap opening and extension)" help=""/>
+    </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="true">
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
     </param>
-    <param name="param_PEPMatrix_penalty" type="integer" min="1" optional="True" value="5" label="Alignment gap penalty (the same value is used for gap opening and extension)" help="(-penalty) "/>
-    <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" metadata_source="param_in" format="input"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format_source="in" metadata_source="in"/>
+    <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>Computes a consensus of peptide identifications of several identification engines.
+  <tests>
+    <expand macro="autotest_ConsensusID"/>
+    <expand macro="manutest_ConsensusID"/>
+  </tests>
+  <help><![CDATA[Computes a consensus of peptide identifications of several identification engines.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_ConsensusID.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_ConsensusID.html]]></help>
+  <expand macro="references"/>
 </tool>