diff ProteinInference.xml @ 13:98adda3af74a 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:00:46 +0000
parents 7951e3db2efd
children e278a1abeebe
line wrap: on
line diff
--- a/ProteinInference.xml	Fri Nov 06 20:26:00 2020 +0000
+++ b/ProteinInference.xml	Thu Dec 01 19:00:46 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: [Identification]-->
-<tool id="ProteinInference" name="ProteinInference" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
+<tool id="ProteinInference" name="ProteinInference" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
   <description>Protein inference based on an aggregation of the scores of the identified peptides.</description>
   <macros>
     <token name="@EXECUTABLE@">ProteinInference</token>
     <import>macros.xml</import>
-    <import>macros_autotest.xml</import>
-    <import>macros_test.xml</import>
   </macros>
   <expand macro="requirements"/>
   <expand macro="stdio"/>
@@ -16,8 +14,13 @@
 #import re
 
 ## Preprocessing
-mkdir in &&
-${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $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
 mkdir out &&
 
 ## Main program call
@@ -27,12 +30,16 @@
 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 $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.${gxy2omsext("idxml")}'
+'out/output.${out_type}'
 
 ## Postprocessing
-&& mv 'out/output.${gxy2omsext("idxml")}' '$out'
+&& mv 'out/output.${out_type}' '$out'
 #if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
   && mv '@EXECUTABLE@.ctd' '$ctd_out'
 #end if]]></command>
@@ -41,42 +48,63 @@
     <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="idxml" multiple="true" optional="false" label="input file(s)" help=" select idxml data sets(s)"/>
-    <param name="merge_runs" argument="-merge_runs" display="radio" type="select" optional="false" label="If your idXML contains multiple runs, merge them beforehand?" help="">
-      <option value="no" selected="true">no</option>
-      <option value="all">all</option>
-      <expand macro="list_string_san"/>
+    <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,idxml" multiple="true" optional="false" label="input file(s)" help=" select consensusxml,idxml data sets(s)"/>
+      </when>
+      <when value="yes">
+        <param argument="-in" type="data" format="consensusxml,idxml" multiple="false" optional="false" label="input file(s)" help=" select consensusxml,idxml data sets(s)"/>
+      </when>
+    </conditional>
+    <param argument="-out_type" display="radio" type="select" optional="false" label="output file type" help="">
+      <option value="consensusXML">consensusxml</option>
+      <option value="idXML">idxml</option>
+      <expand macro="list_string_san" name="out_type"/>
     </param>
-    <param name="annotate_indist_groups" argument="-annotate_indist_groups" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If you want to annotate indistinguishable protein groups, either for reporting or for group based quant" help="later. Only works with a single ID run in the file"/>
+    <param argument="-merge_runs" type="select" optional="true" label="If your idXML contains multiple runs, merge them beforehand" help="Otherwise performs inference separately per run">
+      <option value="no">no</option>
+      <option value="all" selected="true">all</option>
+      <expand macro="list_string_san" name="merge_runs"/>
+    </param>
+    <param argument="-protein_fdr" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Additionally calculate the target-decoy FDR on protein-level after inference" help=""/>
     <section name="Merging" title="" help="" expanded="false">
       <param name="annotate_origin" argument="-Merging:annotate_origin" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If true, adds a map_index MetaValue to the PeptideIDs to annotate the IDRun they came from" help=""/>
       <param name="allow_disagreeing_settings" argument="-Merging:allow_disagreeing_settings" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Force merging of disagreeing runs" help="Use at your own risk"/>
     </section>
     <section name="Algorithm" title="" help="" expanded="false">
       <param name="min_peptides_per_protein" argument="-Algorithm:min_peptides_per_protein" type="integer" optional="true" min="0" value="1" label="Minimal number of peptides needed for a protein identification" help="If set to zero, unmatched proteins get a score of -Infinity. If bigger than zero, proteins with less peptides are filtered and evidences removed from the PSMs. PSMs that do not reference any proteins anymore are removed but the spectrum info is kept"/>
-      <param name="score_aggregation_method" argument="-Algorithm:score_aggregation_method" display="radio" type="select" optional="false" label="How to aggregate scores of peptides matching to the same protein?" help="">
-        <option value="maximum" selected="true">maximum</option>
+      <param name="score_aggregation_method" argument="-Algorithm:score_aggregation_method" type="select" optional="true" label="How to aggregate scores of peptides matching to the same protein?" help="">
+        <option value="best" selected="true">best</option>
         <option value="product">product</option>
         <option value="sum">sum</option>
-        <expand macro="list_string_san"/>
-      </param>
-      <param name="treat_charge_variants_separately" argument="-Algorithm:treat_charge_variants_separately" type="text" optional="true" value="true" label="If this is set, different charge variants of the same peptide sequence count as individual evidences" help="">
-        <expand macro="list_string_san"/>
+        <option value="maximum">maximum</option>
+        <expand macro="list_string_san" name="score_aggregation_method"/>
       </param>
-      <param name="treat_modification_variants_separately" argument="-Algorithm:treat_modification_variants_separately" type="text" optional="true" value="true" label="If this is set, different modification variants of the same peptide sequence count as individual evidences" help="">
-        <expand macro="list_string_san"/>
-      </param>
-      <param name="use_shared_peptides" argument="-Algorithm:use_shared_peptides" type="text" optional="true" value="true" label="If this is set, shared peptides are used as evidences" help="">
-        <expand macro="list_string_san"/>
-      </param>
-      <param name="skip_count_annotation" argument="-Algorithm:skip_count_annotation" type="text" optional="true" value="false" label="If this is true, peptide counts won't be annotated at the proteins" help="">
-        <expand macro="list_string_san"/>
-      </param>
+      <param name="treat_charge_variants_separately" argument="-Algorithm:treat_charge_variants_separately" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If this is true, different charge variants of the same peptide sequence count as individual evidences" help=""/>
+      <param name="treat_modification_variants_separately" argument="-Algorithm:treat_modification_variants_separately" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If this is true, different modification variants of the same peptide sequence count as individual evidences" help=""/>
+      <param name="use_shared_peptides" argument="-Algorithm:use_shared_peptides" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If this is true, shared peptides are used as evidences" help="Note: shared_peptides are not deleted and potentially resolved in postprocessing as well"/>
+      <param name="skip_count_annotation" argument="-Algorithm:skip_count_annotation" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If this is set, peptide counts won't be annotated at the proteins" help=""/>
+      <param name="annotate_indistinguishable_groups" argument="-Algorithm:annotate_indistinguishable_groups" type="boolean" truevalue="true" falsevalue="false" checked="true" label="If this is true, calculates and annotates indistinguishable protein groups" help=""/>
+      <param name="greedy_group_resolution" argument="-Algorithm:greedy_group_resolution" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If this is true, shared peptides will be associated to best proteins only" help="(i.e. become potentially quantifiable razor peptides)"/>
     </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="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
-        <expand macro="list_string_san"/>
+      <param argument="-conservative_fdr" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Use (D+1)/(T) instead of (D+1)/(T+D) for reporting protein FDRs" help=""/>
+      <param argument="-picked_fdr" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Use picked protein FDRs" help=""/>
+      <param argument="-picked_decoy_string" type="text" optional="true" value="" label="If using picked protein FDRs, which decoy string was used" help="Leave blank for auto-detection">
+        <expand macro="list_string_san" name="picked_decoy_string"/>
+      </param>
+      <param argument="-picked_decoy_prefix" type="select" optional="true" label="If using picked protein FDRs, was the decoy string a prefix or suffix" help="Ignored during auto-detection">
+        <option value="prefix" selected="true">prefix</option>
+        <option value="suffix">suffix</option>
+        <expand macro="list_string_san" name="picked_decoy_prefix"/>
+      </param>
+      <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">
@@ -84,18 +112,133 @@
     </param>
   </inputs>
   <outputs>
-    <data name="out" label="${tool.name} on ${on_string}: out" format="idxml"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="consensusxml">
+      <change_format>
+        <when input="out_type" value="idXML" format="idxml"/>
+      </change_format>
+    </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>
-  <tests>
-    <expand macro="autotest_ProteinInference"/>
-    <expand macro="manutest_ProteinInference"/>
+  <tests><!-- TOPP_ProteinInference_1 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="conservative_fdr" value="true"/>
+        <param name="picked_fdr" value="true"/>
+        <param name="picked_decoy_string" value=""/>
+        <param name="picked_decoy_prefix" value="prefix"/>
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="ProteinInference_1_input.idXML"/>
+      </conditional>
+      <output name="out" file="ProteinInference_1_output.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
+      <param name="out_type" value="idXML"/>
+      <param name="merge_runs" value="all"/>
+      <param name="protein_fdr" value="false"/>
+      <section name="Merging">
+        <param name="annotate_origin" value="false"/>
+        <param name="allow_disagreeing_settings" value="false"/>
+      </section>
+      <section name="Algorithm">
+        <param name="min_peptides_per_protein" value="1"/>
+        <param name="score_aggregation_method" value="best"/>
+        <param name="treat_charge_variants_separately" value="true"/>
+        <param name="treat_modification_variants_separately" value="true"/>
+        <param name="use_shared_peptides" value="false"/>
+        <param name="skip_count_annotation" value="false"/>
+        <param name="annotate_indistinguishable_groups" value="true"/>
+        <param name="greedy_group_resolution" value="false"/>
+      </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_ProteinInference_2 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="conservative_fdr" value="true"/>
+        <param name="picked_fdr" value="true"/>
+        <param name="picked_decoy_string" value=""/>
+        <param name="picked_decoy_prefix" value="prefix"/>
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="Epifany_2_input.consensusXML"/>
+      </conditional>
+      <output name="out" file="ProteinInference_2_output.consensusXML" compare="sim_size" delta_frac="0.7" ftype="consensusxml"/>
+      <param name="out_type" value="consensusXML"/>
+      <param name="merge_runs" value="all"/>
+      <param name="protein_fdr" value="false"/>
+      <section name="Merging">
+        <param name="annotate_origin" value="true"/>
+        <param name="allow_disagreeing_settings" value="false"/>
+      </section>
+      <section name="Algorithm">
+        <param name="min_peptides_per_protein" value="1"/>
+        <param name="score_aggregation_method" value="best"/>
+        <param name="treat_charge_variants_separately" value="true"/>
+        <param name="treat_modification_variants_separately" value="true"/>
+        <param name="use_shared_peptides" value="false"/>
+        <param name="skip_count_annotation" value="false"/>
+        <param name="annotate_indistinguishable_groups" value="true"/>
+        <param name="greedy_group_resolution" value="false"/>
+      </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_ProteinInference_3 -->
+    <test expect_num_outputs="2">
+      <section name="adv_opts">
+        <param name="conservative_fdr" value="true"/>
+        <param name="picked_fdr" value="true"/>
+        <param name="picked_decoy_string" value="_rev"/>
+        <param name="picked_decoy_prefix" value="suffix"/>
+        <param name="force" value="false"/>
+        <param name="test" value="true"/>
+      </section>
+      <conditional name="in_cond">
+        <param name="in" value="MSstatsConverter_3_in.consensusXML"/>
+      </conditional>
+      <output name="out" file="ProteinInference_3_output.consensusXML" compare="sim_size" delta_frac="0.7" ftype="consensusxml"/>
+      <param name="out_type" value="consensusXML"/>
+      <param name="merge_runs" value="all"/>
+      <param name="protein_fdr" value="true"/>
+      <section name="Merging">
+        <param name="annotate_origin" value="true"/>
+        <param name="allow_disagreeing_settings" value="false"/>
+      </section>
+      <section name="Algorithm">
+        <param name="min_peptides_per_protein" value="1"/>
+        <param name="score_aggregation_method" value="best"/>
+        <param name="treat_charge_variants_separately" value="true"/>
+        <param name="treat_modification_variants_separately" value="true"/>
+        <param name="use_shared_peptides" value="true"/>
+        <param name="skip_count_annotation" value="false"/>
+        <param name="annotate_indistinguishable_groups" value="true"/>
+        <param name="greedy_group_resolution" value="false"/>
+      </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[Protein inference based on an aggregation of the scores of the identified peptides.
 
 
-For more information, visit http://www.openms.de/doxygen/release/2.6.0/html/TOPP_ProteinInference.html]]></help>
+For more information, visit http://www.openms.de/doxygen/release/2.8.0/html/TOPP_ProteinInference.html]]></help>
   <expand macro="references"/>
 </tool>