diff ConsensusID.xml @ 18:f4be248c3d47 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author galaxyp
date Thu, 01 Dec 2022 19:03:29 +0000
parents abffdfee3021
children 91da6dd00bbc
line wrap: on
line diff
--- a/ConsensusID.xml	Mon Feb 22 10:46:10 2021 +0000
+++ b/ConsensusID.xml	Thu Dec 01 19:03:29 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="ConsensusID" name="ConsensusID" version="@TOOL_VERSION@+galaxy1" profile="20.05">
+<tool id="ConsensusID" name="ConsensusID" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.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="requirements"/>
   <expand macro="stdio"/>
@@ -16,9 +14,13 @@
 #import re
 
 ## Preprocessing
-mkdir in &&
-mkdir ${' '.join(["'in/%s'" % (i) for i, f in enumerate($in) if f])} && 
-${' '.join(["ln -s '%s' 'in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
+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
 mkdir out &&
 
 ## Main program call
@@ -28,12 +30,16 @@
 python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
 @EXECUTABLE@ -ini @EXECUTABLE@.ctd
 -in
-${' '.join(["'in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in) if f])}
+#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
 -out
-'out/output.${in[0].ext}'
+'out/output.${in_cond.in[0].ext}'
 
 ## Postprocessing
-&& mv 'out/output.${in[0].ext}' '$out'
+&& mv 'out/output.${in_cond.in[0].ext}' '$out'
 #if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
   && mv '@EXECUTABLE@.ctd' '$ctd_out'
 #end if]]></command>
@@ -42,11 +48,22 @@
     <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
   </configfiles>
   <inputs>
-    <param name="in" argument="-in" type="data" format="consensusxml,featurexml,idxml" multiple="true" optional="false" label="input file" help=" select consensusxml,featurexml,idxml data sets(s)"/>
-    <param name="rt_delta" argument="-rt_delta" type="float" optional="false" 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="false" 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="per_spectrum" argument="-per_spectrum" type="boolean" truevalue="true" falsevalue="false" checked="false" label="(only idXML) if set, mapping will be done based on exact matching of originating mzml file and spectrum_ref" 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">
+    <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="consensusxml,featurexml,idxml" multiple="true" optional="false" label="input file" help=" select consensusxml,featurexml,idxml data sets(s)"/>
+      </when>
+      <when value="yes">
+        <param argument="-in" type="data" format="consensusxml,featurexml,idxml" multiple="false" optional="false" label="input file" help=" select consensusxml,featurexml,idxml data sets(s)"/>
+      </when>
+    </conditional>
+    <param 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 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 argument="-per_spectrum" type="boolean" truevalue="true" falsevalue="false" checked="false" label="(only idXML) if set, mapping will be done based on exact matching of originating mzml file and spectrum_ref" help=""/>
+    <param argument="-algorithm" type="select" optional="true" 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>
@@ -56,26 +73,26 @@
       <expand macro="list_string_san" name="algorithm"/>
     </param>
     <section name="filter" title="Options for filtering peptide hits" help="" expanded="false">
-      <param name="considered_hits" argument="-filter:considered_hits" type="integer" optional="false" 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="false" 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="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'?"/>
       <param name="keep_old_scores" argument="-filter:keep_old_scores" type="boolean" truevalue="true" falsevalue="false" checked="false" label="if set, keeps the original scores as user params" help=""/>
     </section>
     <section name="PEPIons" title="PEPIons algorithm parameters" help="" expanded="false">
-      <param name="mass_tolerance" argument="-PEPIons:mass_tolerance" type="float" optional="false" 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="false" 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=""/>
+      <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="checkboxes" 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>
+      <param name="matrix" argument="-PEPMatrix:matrix" type="select" optional="true" label="Substitution matrix to use for alignment-based similarity scoring" help="">
+        <option value="identity">identity</option>
+        <option value="PAM30MS" selected="true">PAM30MS</option>
         <expand macro="list_string_san" name="matrix"/>
       </param>
-      <param name="penalty" argument="-PEPMatrix:penalty" type="integer" optional="false" min="1" value="5" label="Alignment gap penalty (the same value is used for gap opening and extension)" help=""/>
+      <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="Overrides tool-specific checks" help=""/>
-      <param name="test" argument="-test" type="hidden" optional="false" value="False" label="Enables the test mode (needed for internal use only)" help="">
+      <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>
@@ -89,13 +106,290 @@
       <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
     </data>
   </outputs>
-  <tests>
-    <expand macro="autotest_ConsensusID"/>
-    <expand macro="manutest_ConsensusID"/>
+  <tests><!-- TOPP_ConsensusID_1 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_1_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_1_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="PEPMatrix"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_2 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_2_input.featureXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_2_output.featureXML" compare="sim_size" delta_frac="0.7" ftype="featurexml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="average"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_3 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_3_input.consensusXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_3_output.consensusXML" compare="sim_size" delta_frac="0.7" ftype="consensusxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="best"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_4 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_1_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_4_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="PEPMatrix"/>
+      <section name="filter">
+        <param name="considered_hits" value="6"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="identity"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_5 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_1_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_5_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="PEPIons"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_6 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_1_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_6_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="false"/>
+      <param name="algorithm" value="best"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.5"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="false"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_7 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_6_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_7_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="true"/>
+      <param name="algorithm" value="best"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="true"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
+    <!-- TOPP_ConsensusID_8 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ConsensusID_8_input.idXML"/>
+      </conditional>
+      <output name="out" file="ConsensusID_8_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="rt_delta" value="0.1"/>
+      <param name="mz_delta" value="0.1"/>
+      <param name="per_spectrum" value="true"/>
+      <param name="algorithm" value="best"/>
+      <section name="filter">
+        <param name="considered_hits" value="0"/>
+        <param name="min_support" value="0.0"/>
+        <param name="count_empty" value="false"/>
+        <param name="keep_old_scores" value="true"/>
+      </section>
+      <section name="PEPIons">
+        <param name="mass_tolerance" value="0.5"/>
+        <param name="min_shared" value="2"/>
+      </section>
+      <section name="PEPMatrix">
+        <param name="matrix" value="PAM30MS"/>
+        <param name="penalty" value="5"/>
+      </section>
+      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
+      <output name="ctd_out" ftype="xml">
+        <assert_contents>
+          <is_valid_xml/>
+        </assert_contents>
+      </output>
+    </test>
   </tests>
   <help><![CDATA[Computes a consensus of peptide identifications of several identification engines.
 
 
-For more information, visit http://www.openms.de/doxygen/release/2.6.0/html/TOPP_ConsensusID.html]]></help>
+For more information, visit http://www.openms.de/doxygen/release/2.8.0/html/TOPP_ConsensusID.html]]></help>
   <expand macro="references"/>
 </tool>