view SvmTheoreticalSpectrumGeneratorTrainer.xml @ 13:3c5de1c6c08a draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author galaxyp
date Thu, 01 Dec 2022 19:21:45 +0000
parents b1a8601e2ea0
children
line wrap: on
line source

<?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: [Utilities]-->
<tool id="SvmTheoreticalSpectrumGeneratorTrainer" name="SvmTheoreticalSpectrumGeneratorTrainer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Trainer for SVM models as input for SvmTheoreticalSpectrumGenerator</description>
  <macros>
    <token name="@EXECUTABLE@">SvmTheoreticalSpectrumGeneratorTrainer</token>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"/>
  <expand macro="stdio"/>
  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
@EXT_FOO@
#import re

## Preprocessing
mkdir in_spectra &&
ln -s '$in_spectra' 'in_spectra/${re.sub("[^\w\-_]", "_", $in_spectra.element_identifier)}.$gxy2omsext($in_spectra.ext)' &&
mkdir in_identifications &&
ln -s '$in_identifications' 'in_identifications/${re.sub("[^\w\-_]", "_", $in_identifications.element_identifier)}.$gxy2omsext($in_identifications.ext)' &&
mkdir model_output_file &&

## 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_spectra
'in_spectra/${re.sub("[^\w\-_]", "_", $in_spectra.element_identifier)}.$gxy2omsext($in_spectra.ext)'
-in_identifications
'in_identifications/${re.sub("[^\w\-_]", "_", $in_identifications.element_identifier)}.$gxy2omsext($in_identifications.ext)'
-model_output_file
'model_output_file/output.${gxy2omsext("txt")}'

## Postprocessing
&& mv 'model_output_file/output.${gxy2omsext("txt")}' '$model_output_file'
#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 argument="-in_spectra" type="data" format="mzml" optional="false" label="Input Training Spectra in mzML" help=" select mzml data sets(s)"/>
    <param argument="-in_identifications" type="data" format="idxml" optional="false" label="Input file with corresponding sequences in idXML" help=" select idxml data sets(s)"/>
    <param argument="-precursor_charge" type="integer" optional="true" min="1" max="3" value="2" label="Precursor charge state used for model training" help=""/>
    <param argument="-write_training_files" type="boolean" truevalue="true" falsevalue="false" checked="false" label="No models are trained but input training files for libSVM command line tools are produced" help=""/>
    <section name="algorithm" title="" help="" expanded="false">
      <param name="number_intensity_levels" argument="-algorithm:number_intensity_levels" type="integer" optional="true" value="7" label="The number of intensity bins (for secondary type models)" help=""/>
      <param name="number_regions" argument="-algorithm:number_regions" type="integer" optional="true" value="3" label="The number of regions each spectrum is split to (for secondary type models)" help=""/>
      <param name="parent_tolerance" argument="-algorithm:parent_tolerance" type="float" optional="true" value="2.5" label="The maximum difference between theoretical and experimental parent mass to accept training spectrum" help=""/>
      <param name="peak_tolerance" argument="-algorithm:peak_tolerance" type="float" optional="true" value="0.5" label="The maximum mass error for a peak to the expected mass of some ion type" help=""/>
      <param name="add_b_ions" argument="-algorithm:add_b_ions" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Train simulator for b-ions" help=""/>
      <param name="add_y_ions" argument="-algorithm:add_y_ions" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Train simulator for y-ions" help=""/>
      <param name="add_a_ions" argument="-algorithm:add_a_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for a-ions" help=""/>
      <param name="add_c_ions" argument="-algorithm:add_c_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for c-ions" help=""/>
      <param name="add_x_ions" argument="-algorithm:add_x_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for x-ions" help=""/>
      <param name="add_z_ions" argument="-algorithm:add_z_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for z-ions" help=""/>
      <param name="add_losses" argument="-algorithm:add_losses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for neutral losses of H2O and NH3 for b-ions and y-ions" help=""/>
      <param name="add_b2_ions" argument="-algorithm:add_b2_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for doubly charged b-ions" help=""/>
      <param name="add_y2_ions" argument="-algorithm:add_y2_ions" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Train simulator for double charged y-ions" help=""/>
      <section name="svm" title="Parameters controlling SVM trainig behaviou" help="All parameter names are chosen as in the libSVM library. Please refer to libSVM documentation for explanation" expanded="false">
        <param name="svc_type" argument="-algorithm:svm:svc_type" type="integer" optional="true" min="0" max="1" value="0" label="Type of the SVC: 0=C_SVC 1=NU_SVC" help=""/>
        <param name="svr_type" argument="-algorithm:svm:svr_type" type="integer" optional="true" min="0" max="1" value="1" label="Type of the SVR: 0=EPSILON_SVR 1=NU_SVR" help=""/>
        <param name="scaling" argument="-algorithm:svm:scaling" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Apply scaling of feature values" help=""/>
        <param name="scaling_lower" argument="-algorithm:svm:scaling_lower" type="float" optional="true" value="0.0" label="Lower bound for scaling" help=""/>
        <param name="scaling_upper" argument="-algorithm:svm:scaling_upper" type="float" optional="true" value="1.0" label="Upper bound for scaling" help=""/>
        <param name="n_fold" argument="-algorithm:svm:n_fold" type="integer" optional="true" min="1" value="5" label="n_fold cross validation is performed" help=""/>
        <param name="grid" argument="-algorithm:svm:grid" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Perform grid search" help=""/>
        <param name="additive_cv" argument="-algorithm:svm:additive_cv" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Additive step size (if false multiplicative)" help=""/>
        <section name="svc" title="Parameters for svm - classification of missing/abundant" help="" expanded="false">
          <param name="kernel_type" argument="-algorithm:svm:svc:kernel_type" type="integer" optional="true" min="0" max="3" value="2" label="Type of the kernel:  0=LINEAR 1=POLY 2=RBF 3=SIGMOID" help=""/>
          <param name="degree" argument="-algorithm:svm:svc:degree" type="integer" optional="true" min="1" value="3" label="For POLY" help=""/>
          <param name="gamma" argument="-algorithm:svm:svc:gamma" type="float" optional="true" min="0.0" value="0.0" label="For POLY/RBF/SIGMOID" help=""/>
          <param name="C" argument="-algorithm:svm:svc:C" type="float" optional="true" value="1.0" label="Cost of constraint violation" help=""/>
          <param name="nu" argument="-algorithm:svm:svc:nu" type="float" optional="true" value="0.5" label="For NU_SVC, ONE_CLASS and NU_SVR" help=""/>
          <param name="balancing" argument="-algorithm:svm:svc:balancing" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Use class balanced SVC training" help=""/>
          <param name="degree_start" argument="-algorithm:svm:svc:degree_start" type="integer" optional="true" min="1" value="1" label="starting point of degree" help=""/>
          <param name="degree_step_size" argument="-algorithm:svm:svc:degree_step_size" type="integer" optional="true" value="2" label="step size point of degree" help=""/>
          <param name="degree_stop" argument="-algorithm:svm:svc:degree_stop" type="integer" optional="true" value="4" label="stopping point of degree" help=""/>
          <param name="gamma_start" argument="-algorithm:svm:svc:gamma_start" type="float" optional="true" min="0.0" max="1.0" value="1e-05" label="starting point of gamma" help=""/>
          <param name="gamma_step_size" argument="-algorithm:svm:svc:gamma_step_size" type="integer" optional="true" value="100" label="step size point of gamma" help=""/>
          <param name="gamma_stop" argument="-algorithm:svm:svc:gamma_stop" type="float" optional="true" value="0.1" label="stopping point of gamma" help=""/>
          <param name="c_start" argument="-algorithm:svm:svc:c_start" type="float" optional="true" value="0.1" label="starting point of c" help=""/>
          <param name="c_step_size" argument="-algorithm:svm:svc:c_step_size" type="integer" optional="true" value="100" label="step size of c" help=""/>
          <param name="c_stop" argument="-algorithm:svm:svc:c_stop" type="integer" optional="true" value="1000" label="stopping point of c" help=""/>
          <param name="nu_start" argument="-algorithm:svm:svc:nu_start" type="float" optional="true" min="0.0" max="1.0" value="0.3" label="starting point of nu" help=""/>
          <param name="nu_step_size" argument="-algorithm:svm:svc:nu_step_size" type="integer" optional="true" value="2" label="step size of nu" help=""/>
          <param name="nu_stop" argument="-algorithm:svm:svc:nu_stop" type="float" optional="true" min="0.0" max="1.0" value="0.6" label="stopping point of nu" help=""/>
        </section>
        <section name="svr" title="Parameters for svm - regression of peak intensities" help="" expanded="false">
          <param name="kernel_type" argument="-algorithm:svm:svr:kernel_type" type="integer" optional="true" min="0" max="3" value="2" label="Type of the kernel:  0=LINEAR 1=POLY 2=RBF 3=SIGMOID" help=""/>
          <param name="degree" argument="-algorithm:svm:svr:degree" type="integer" optional="true" min="1" value="3" label="For POLY" help=""/>
          <param name="gamma" argument="-algorithm:svm:svr:gamma" type="float" optional="true" min="0.0" value="0.0" label="For POLY/RBF/SIGMOID" help=""/>
          <param name="C" argument="-algorithm:svm:svr:C" type="float" optional="true" value="1.0" label="Cost of constraint violation" help=""/>
          <param name="p" argument="-algorithm:svm:svr:p" type="float" optional="true" value="0.1" label="The epsilon for the loss function in epsilon-SVR" help=""/>
          <param name="nu" argument="-algorithm:svm:svr:nu" type="float" optional="true" value="0.5" label="For NU_SVC, ONE_CLASS and NU_SVR" help=""/>
          <param name="degree_start" argument="-algorithm:svm:svr:degree_start" type="integer" optional="true" min="1" value="1" label="starting point of degree" help=""/>
          <param name="degree_step_size" argument="-algorithm:svm:svr:degree_step_size" type="integer" optional="true" value="2" label="step size point of degree" help=""/>
          <param name="degree_stop" argument="-algorithm:svm:svr:degree_stop" type="integer" optional="true" value="4" label="stopping point of degree" help=""/>
          <param name="gamma_start" argument="-algorithm:svm:svr:gamma_start" type="float" optional="true" min="0.0" max="1.0" value="1e-05" label="starting point of gamma" help=""/>
          <param name="gamma_step_size" argument="-algorithm:svm:svr:gamma_step_size" type="integer" optional="true" value="100" label="step size point of gamma" help=""/>
          <param name="gamma_stop" argument="-algorithm:svm:svr:gamma_stop" type="float" optional="true" value="0.1" label="stopping point of gamma" help=""/>
          <param name="p_start" argument="-algorithm:svm:svr:p_start" type="float" optional="true" value="1e-05" label="starting point of p" help=""/>
          <param name="p_step_size" argument="-algorithm:svm:svr:p_step_size" type="integer" optional="true" value="100" label="step size point of p" help=""/>
          <param name="p_stop" argument="-algorithm:svm:svr:p_stop" type="float" optional="true" value="0.1" label="stopping point of p" help=""/>
          <param name="c_start" argument="-algorithm:svm:svr:c_start" type="float" optional="true" value="0.1" label="starting point of c" help=""/>
          <param name="c_step_size" argument="-algorithm:svm:svr:c_step_size" type="integer" optional="true" value="100" label="step size of c" help=""/>
          <param name="c_stop" argument="-algorithm:svm:svr:c_stop" type="integer" optional="true" value="1000" label="stopping point of c" help=""/>
          <param name="nu_start" argument="-algorithm:svm:svr:nu_start" type="float" optional="true" min="0.0" max="1.0" value="0.3" label="starting point of nu" help=""/>
          <param name="nu_step_size" argument="-algorithm:svm:svr:nu_step_size" type="integer" optional="true" value="2" label="step size of nu" help=""/>
          <param name="nu_stop" argument="-algorithm:svm:svr:nu_stop" type="float" optional="true" min="0.0" max="1.0" value="0.6" label="stopping point of nu" help=""/>
        </section>
      </section>
    </section>
    <expand macro="adv_opts_macro">
      <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">
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="model_output_file" label="${tool.name} on ${on_string}: model_output_file" format="txt"/>
    <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><!-- -TODO model_output_file creates multiple files-->
</tests>
  <help><![CDATA[Trainer for SVM models as input for SvmTheoreticalSpectrumGenerator


For more information, visit http://www.openms.de/doxygen/release/2.8.0/html/UTILS_SvmTheoreticalSpectrumGeneratorTrainer.html]]></help>
  <expand macro="references"/>
</tool>