diff IDPosteriorErrorProbability.xml @ 10:18ee86db4af2 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:10:31 +0000
parents 5d9f175dff81
children 711a081d80ba
line wrap: on
line diff
--- a/IDPosteriorErrorProbability.xml	Fri May 17 10:24:45 2019 -0400
+++ b/IDPosteriorErrorProbability.xml	Wed Sep 09 20:10:31 2020 +0000
@@ -1,84 +1,109 @@
 <?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="IDPosteriorErrorProbability" name="IDPosteriorErrorProbability" version="2.3.0">
+<tool id="IDPosteriorErrorProbability" name="IDPosteriorErrorProbability" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Estimates probabilities for incorrectly assigned peptide sequences and a set of search engine scores using a mixture model.</description>
   <macros>
     <token name="@EXECUTABLE@">IDPosteriorErrorProbability</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[IDPosteriorErrorProbability
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_out_plot:
-  -out_plot $param_out_plot
-#end if
-#if $param_split_charge:
-  -split_charge
-#end if
-#if $param_top_hits_only:
-  -top_hits_only
-#end if
-#if $param_ignore_bad_data:
-  -ignore_bad_data
-#end if
-#if $param_prob_correct:
-  -prob_correct
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_fdr_for_targets_smaller:
-  -fdr_for_targets_smaller $adv_opts.param_fdr_for_targets_smaller
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
+#if "out_plot_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir out_plot &&
 #end if
-    #if $adv_opts.param_force:
-  -force
-#end if
-    #if $adv_opts.param_fit_algorithm_number_of_bins:
-  -fit_algorithm:number_of_bins $adv_opts.param_fit_algorithm_number_of_bins
+
+## 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
+-in
+'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
+-out
+'out/output.${gxy2omsext("idxml")}'
+#if "out_plot_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -out_plot
+  'out_plot/output.${gxy2omsext("txt")}'
 #end if
-    #if $adv_opts.param_fit_algorithm_incorrectly_assigned:
-  -fit_algorithm:incorrectly_assigned
-  #if " " in str($adv_opts.param_fit_algorithm_incorrectly_assigned):
-    "$adv_opts.param_fit_algorithm_incorrectly_assigned"
-  #else
-    $adv_opts.param_fit_algorithm_incorrectly_assigned
-  #end if
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
 #end if
-    #if $adv_opts.param_fit_algorithm_max_nr_iterations:
-  -fit_algorithm:max_nr_iterations $adv_opts.param_fit_algorithm_max_nr_iterations
+
+## Postprocessing
+&& mv 'out/output.${gxy2omsext("idxml")}' '$out'
+#if "out_plot_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'out_plot/output.${gxy2omsext("txt")}' '$out_plot'
 #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_in" type="data" format="idxml" optional="False" label="input file" help="(-in) "/>
-    <param name="param_split_charge" display="radio" type="boolean" truevalue="-split_charge" falsevalue="" checked="false" optional="True" label="The search engine scores are split by charge if this flag is set" help="(-split_charge) Thus, for each charge state a new model will be computed"/>
-    <param name="param_top_hits_only" display="radio" type="boolean" truevalue="-top_hits_only" falsevalue="" checked="false" optional="True" label="If set only the top hits of every PeptideIdentification will be used" help="(-top_hits_only) "/>
-    <param name="param_ignore_bad_data" display="radio" type="boolean" truevalue="-ignore_bad_data" falsevalue="" checked="false" optional="True" label="If set errors will be written but ignored" help="(-ignore_bad_data) Useful for pipelines with many datasets where only a few are bad, but the pipeline should run through"/>
-    <param name="param_prob_correct" display="radio" type="boolean" truevalue="-prob_correct" falsevalue="" checked="false" optional="True" label="If set scores will be calculated as '1 - ErrorProbabilities' and can be interpreted as probabilities for correct identifications" help="(-prob_correct) "/>
-    <expand macro="advanced_options">
-      <param name="param_fdr_for_targets_smaller" type="float" value="0.05" label="Only used, when top_hits_only set" help="(-fdr_for_targets_smaller) Additionally, target/decoy information should be available. The score_type must be q-value from an previous False Discovery Rate run"/>
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
-      <param name="param_fit_algorithm_number_of_bins" type="integer" value="100" label="Number of bins used for visualization" help="(-number_of_bins) Only needed if each iteration step of the EM-Algorithm will be visualized"/>
-      <param name="param_fit_algorithm_incorrectly_assigned" display="radio" type="select" optional="False" value="Gumbel" label="for 'Gumbel', the Gumbel distribution is used to plot incorrectly assigned sequences" help="(-incorrectly_assigned) For 'Gauss', the Gauss distribution is used">
+    <param name="in" argument="-in" type="data" format="idxml" optional="false" label="input file" help=" select idxml data sets(s)"/>
+    <param name="split_charge" argument="-split_charge" type="boolean" truevalue="true" falsevalue="false" checked="false" label="The search engine scores are split by charge if this flag is set" help="Thus, for each charge state a new model will be computed"/>
+    <param name="top_hits_only" argument="-top_hits_only" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If set only the top hits of every PeptideIdentification will be used" help=""/>
+    <param name="ignore_bad_data" argument="-ignore_bad_data" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If set errors will be written but ignored" help="Useful for pipelines with many datasets where only a few are bad, but the pipeline should run through"/>
+    <param name="prob_correct" argument="-prob_correct" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If set scores will be calculated as '1 - ErrorProbabilities' and can be interpreted as probabilities for correct identifications" help=""/>
+    <section name="fit_algorithm" title="Algorithm parameter subsection" help="" expanded="false">
+      <param name="number_of_bins" argument="-fit_algorithm:number_of_bins" type="integer" optional="true" value="100" label="Number of bins used for visualization" help="Only needed if each iteration step of the EM-Algorithm will be visualized"/>
+      <param name="incorrectly_assigned" argument="-fit_algorithm:incorrectly_assigned" display="radio" type="select" optional="false" label="for 'Gumbel', the Gumbel distribution is used to plot incorrectly assigned sequences" help="For 'Gauss', the Gauss distribution is used">
         <option value="Gumbel" selected="true">Gumbel</option>
         <option value="Gauss">Gauss</option>
+        <expand macro="list_string_san"/>
       </param>
-      <param name="param_fit_algorithm_max_nr_iterations" type="integer" value="1000" label="Bounds the number of iterations for the EM algorithm when convergence is slow" help="(-max_nr_iterations) "/>
+      <param name="max_nr_iterations" argument="-fit_algorithm:max_nr_iterations" type="integer" optional="true" value="1000" label="Bounds the number of iterations for the EM algorithm when convergence is slow" help=""/>
+      <param name="neg_log_delta" argument="-fit_algorithm:neg_log_delta" type="integer" optional="true" value="6" label="The negative logarithm of the convergence threshold for the likelihood increase" help=""/>
+      <param name="outlier_handling" argument="-fit_algorithm:outlier_handling" display="radio" type="select" optional="false" label="What to do with outliers:" help="- ignore_iqr_outliers: ignore outliers outside of 3*IQR from Q1/Q3 for fitting. - set_iqr_to_closest_valid: set IQR-based outliers to the last valid value for fitting. - ignore_extreme_percentiles: ignore everything outside 99th and 1st percentile (also removes equal values like potential censored max values in XTandem). - none: do nothing">
+        <option value="ignore_iqr_outliers" selected="true">ignore_iqr_outliers</option>
+        <option value="set_iqr_to_closest_valid">set_iqr_to_closest_valid</option>
+        <option value="ignore_extreme_percentiles">ignore_extreme_percentiles</option>
+        <option value="none">none</option>
+        <expand macro="list_string_san"/>
+      </param>
+    </section>
+    <expand macro="adv_opts_macro">
+      <param name="fdr_for_targets_smaller" argument="-fdr_for_targets_smaller" type="float" optional="true" value="0.05" label="Only used, when top_hits_only set" help="Additionally, target/decoy information should be available. The score_type must be q-value from an previous False Discovery Rate run"/>
+      <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="out_plot_FLAG">out_plot (What to do with outliers:)</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
   </inputs>
   <outputs>
-    <data name="param_out" format="idxml"/>
-    <data name="param_out_plot" format="txt"/>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="idxml"/>
+    <data name="out_plot" label="${tool.name} on ${on_string}: out_plot" format="txt">
+      <filter>OPTIONAL_OUTPUTS is not None and "out_plot_FLAG" in OPTIONAL_OUTPUTS</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>Estimates probabilities for incorrectly assigned peptide sequences and a set of search engine scores using a mixture model.
+  <tests>
+    <expand macro="autotest_IDPosteriorErrorProbability"/>
+    <expand macro="manutest_IDPosteriorErrorProbability"/>
+  </tests>
+  <help><![CDATA[Estimates probabilities for incorrectly assigned peptide sequences and a set of search engine scores using a mixture model.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_IDPosteriorErrorProbability.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_IDPosteriorErrorProbability.html]]></help>
+  <expand macro="references"/>
 </tool>