Mercurial > repos > galaxyp > openms_ptmodel
diff PTModel.xml @ 8:039029f54c89 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
author | galaxyp |
---|---|
date | Thu, 03 Sep 2020 16:19:44 +0000 |
parents | 88bd406e3b22 |
children | b6db68398c9e |
line wrap: on
line diff
--- a/PTModel.xml Fri May 17 10:24:30 2019 -0400 +++ b/PTModel.xml Thu Sep 03 16:19:44 2020 +0000 @@ -1,170 +1,114 @@ <?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: [Peptide property prediction]--> -<tool id="PTModel" name="PTModel" version="2.3.0"> +<tool id="PTModel" name="PTModel" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05"> <description>Trains a model for the prediction of proteotypic peptides from a training set.</description> <macros> <token name="@EXECUTABLE@">PTModel</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[PTModel + <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@ +@EXT_FOO@ +#import re + +## Preprocessing +mkdir in_positive && +ln -s '$in_positive' 'in_positive/${re.sub("[^\w\-_]", "_", $in_positive.element_identifier)}.$gxy2omsext($in_positive.ext)' && +mkdir in_negative && +ln -s '$in_negative' 'in_negative/${re.sub("[^\w\-_]", "_", $in_negative.element_identifier)}.$gxy2omsext($in_negative.ext)' && +mkdir out && + +## Main program call -#if $param_in_positive: - -in_positive $param_in_positive -#end if -#if $param_in_negative: - -in_negative $param_in_negative -#end if -#if $param_out: - -out $param_out -#end if -#if $param_c: - -c $param_c -#end if -#if $param_svm_type: - -svm_type - #if " " in str($param_svm_type): - "$param_svm_type" - #else - $param_svm_type - #end if -#end if -#if $param_nu: - -nu $param_nu -#end if -#if $param_kernel_type: - -kernel_type - #if " " in str($param_kernel_type): - "$param_kernel_type" - #else - $param_kernel_type - #end if -#end if -#if $param_degree: - -degree $param_degree -#end if -#if $param_border_length: - -border_length $param_border_length -#end if -#if $param_k_mer_length: - -k_mer_length $param_k_mer_length -#end if -#if $param_sigma: - -sigma $param_sigma -#end if -#if $param_max_positive_count: - -max_positive_count $param_max_positive_count -#end if -#if $param_max_negative_count: - -max_negative_count $param_max_negative_count -#end if -#if $param_redundant: - -redundant -#end if -#if $param_additive_cv: - -additive_cv -#end if -#if $param_cv_skip_cv: - -cv:skip_cv -#end if -#if $param_cv_number_of_runs: - -cv:number_of_runs $param_cv_number_of_runs -#end if -#if $param_cv_number_of_partitions: - -cv:number_of_partitions $param_cv_number_of_partitions -#end if -#if $param_cv_degree_start: - -cv:degree_start $param_cv_degree_start -#end if -#if $param_cv_degree_step_size: - -cv:degree_step_size $param_cv_degree_step_size -#end if -#if $param_cv_degree_stop: - -cv:degree_stop $param_cv_degree_stop -#end if -#if $param_cv_c_start: - -cv:c_start $param_cv_c_start -#end if -#if $param_cv_c_step_size: - -cv:c_step_size $param_cv_c_step_size -#end if -#if $param_cv_c_stop: - -cv:c_stop $param_cv_c_stop -#end if -#if $param_cv_nu_start: - -cv:nu_start $param_cv_nu_start -#end if -#if $param_cv_nu_step_size: - -cv:nu_step_size $param_cv_nu_step_size -#end if -#if $param_cv_nu_stop: - -cv:nu_stop $param_cv_nu_stop -#end if -#if $param_cv_sigma_start: - -cv:sigma_start $param_cv_sigma_start -#end if -#if $param_cv_sigma_step_size: - -cv:sigma_step_size $param_cv_sigma_step_size -#end if -#if $param_cv_sigma_stop: - -cv:sigma_stop $param_cv_sigma_stop -#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_positive +'in_positive/${re.sub("[^\w\-_]", "_", $in_positive.element_identifier)}.$gxy2omsext($in_positive.ext)' +-in_negative +'in_negative/${re.sub("[^\w\-_]", "_", $in_negative.element_identifier)}.$gxy2omsext($in_negative.ext)' +-out +'out/output.${gxy2omsext("txt")}' + +## Postprocessing +&& mv 'out/output.${gxy2omsext("txt")}' '$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_positive" type="data" format="idxml" optional="False" label="input file with positive examples" help="(-in_positive) "/> - <param name="param_in_negative" type="data" format="idxml" optional="False" label="input file with negative examples" help="(-in_negative) "/> - <param name="param_c" type="float" value="1.0" label="the penalty parameter of the svm" help="(-c) "/> - <param name="param_svm_type" display="radio" type="select" optional="False" value="C_SVC" label="the type of the svm (NU_SVC or C_SVC)" help="(-svm_type) "> + <param name="in_positive" argument="-in_positive" type="data" format="idxml" optional="false" label="input file with positive examples" help=" select idxml data sets(s)"/> + <param name="in_negative" argument="-in_negative" type="data" format="idxml" optional="false" label="input file with negative examples" help=" select idxml data sets(s)"/> + <param name="c" argument="-c" type="float" optional="true" value="1.0" label="the penalty parameter of the svm" help=""/> + <param name="svm_type" argument="-svm_type" display="radio" type="select" optional="false" label="the type of the svm (NU_SVC or C_SVC)" help=""> <option value="NU_SVC">NU_SVC</option> <option value="C_SVC" selected="true">C_SVC</option> + <expand macro="list_string_san"/> </param> - <param name="param_nu" type="float" min="0.0" max="1.0" optional="True" value="0.5" label="the nu parameter [0..1] of the svm (for nu-SVR)" help="(-nu) "/> - <param name="param_kernel_type" display="radio" type="select" optional="False" value="OLIGO" label="the kernel type of the svm" help="(-kernel_type) "> + <param name="nu" argument="-nu" type="float" optional="true" min="0.0" max="1.0" value="0.5" label="the nu parameter [0..1] of the svm (for nu-SVR)" help=""/> + <param name="kernel_type" argument="-kernel_type" display="radio" type="select" optional="false" label="the kernel type of the svm" help=""> <option value="LINEAR">LINEAR</option> <option value="RBF">RBF</option> <option value="POLY">POLY</option> <option value="OLIGO" selected="true">OLIGO</option> + <expand macro="list_string_san"/> </param> - <param name="param_degree" type="integer" min="1" optional="True" value="1" label="the degree parameter of the kernel function of the svm (POLY kernel)" help="(-degree) "/> - <param name="param_border_length" type="integer" min="1" optional="True" value="22" label="length of the POBK" help="(-border_length) "/> - <param name="param_k_mer_length" type="integer" min="1" optional="True" value="1" label="k_mer length of the POBK" help="(-k_mer_length) "/> - <param name="param_sigma" type="float" value="5.0" label="sigma of the POBK" help="(-sigma) "/> - <param name="param_max_positive_count" type="integer" min="1" optional="True" value="1000" label="quantity of positive samples for training (randomly chosen if smaller than available quantity)" help="(-max_positive_count) "/> - <param name="param_max_negative_count" type="integer" min="1" optional="True" value="1000" label="quantity of positive samples for training (randomly chosen if smaller than available quantity)" help="(-max_negative_count) "/> - <param name="param_redundant" display="radio" type="boolean" truevalue="-redundant" falsevalue="" checked="false" optional="True" label="if the input sets are redundant and the redundant peptides should occur more than once in the training set, this flag has to be set" help="(-redundant) "/> - <param name="param_additive_cv" display="radio" type="boolean" truevalue="-additive_cv" falsevalue="" checked="false" optional="True" label="if the step sizes should be interpreted additively (otherwise the actual value is multiplied with the step size to get the new value" help="(-additive_cv) "/> - <param name="param_cv_skip_cv" display="radio" type="boolean" truevalue="-cv:skip_cv" falsevalue="" checked="false" optional="True" label="Has to be set if the cv should be skipped and the model should just be trained with the specified parameters" help="(-skip_cv) "/> - <param name="param_cv_number_of_runs" type="integer" min="1" optional="True" value="10" label="number of runs for the CV" help="(-number_of_runs) "/> - <param name="param_cv_number_of_partitions" type="integer" min="2" optional="True" value="10" label="number of CV partitions" help="(-number_of_partitions) "/> - <param name="param_cv_degree_start" type="integer" min="1" optional="True" value="1" label="starting point of degree" help="(-degree_start) "/> - <param name="param_cv_degree_step_size" type="integer" value="2" label="step size point of degree" help="(-degree_step_size) "/> - <param name="param_cv_degree_stop" type="integer" value="4" label="stopping point of degree" help="(-degree_stop) "/> - <param name="param_cv_c_start" type="float" value="1.0" label="starting point of c" help="(-c_start) "/> - <param name="param_cv_c_step_size" type="float" value="100.0" label="step size of c" help="(-c_step_size) "/> - <param name="param_cv_c_stop" type="float" value="1000.0" label="stopping point of c" help="(-c_stop) "/> - <param name="param_cv_nu_start" type="float" min="0.0" max="1.0" optional="True" value="0.1" label="starting point of nu" help="(-nu_start) "/> - <param name="param_cv_nu_step_size" type="float" value="1.3" label="step size of nu" help="(-nu_step_size) "/> - <param name="param_cv_nu_stop" type="float" min="0.0" max="1.0" optional="True" value="0.9" label="stopping point of nu" help="(-nu_stop) "/> - <param name="param_cv_sigma_start" type="float" value="1.0" label="starting point of sigma" help="(-sigma_start) "/> - <param name="param_cv_sigma_step_size" type="float" value="1.3" label="step size of sigma" help="(-sigma_step_size) "/> - <param name="param_cv_sigma_stop" type="float" value="15.0" label="stopping point of sigma" help="(-sigma_stop) "/> - <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) "/> + <param name="degree" argument="-degree" type="integer" optional="true" min="1" value="1" label="the degree parameter of the kernel function of the svm (POLY kernel)" help=""/> + <param name="border_length" argument="-border_length" type="integer" optional="true" min="1" value="22" label="length of the POBK" help=""/> + <param name="k_mer_length" argument="-k_mer_length" type="integer" optional="true" min="1" value="1" label="k_mer length of the POBK" help=""/> + <param name="sigma" argument="-sigma" type="float" optional="true" value="5.0" label="sigma of the POBK" help=""/> + <param name="max_positive_count" argument="-max_positive_count" type="integer" optional="true" min="1" value="1000" label="quantity of positive samples for training (randomly chosen if smaller than available quantity)" help=""/> + <param name="max_negative_count" argument="-max_negative_count" type="integer" optional="true" min="1" value="1000" label="quantity of positive samples for training (randomly chosen if smaller than available quantity)" help=""/> + <param name="redundant" argument="-redundant" type="boolean" truevalue="true" falsevalue="false" checked="false" label="if the input sets are redundant and the redundant peptides should occur more than once in the training set, this flag has to be set" help=""/> + <param name="additive_cv" argument="-additive_cv" type="boolean" truevalue="true" falsevalue="false" checked="false" label="if the step sizes should be interpreted additively (otherwise the actual value is multiplied with the step size to get the new value" help=""/> + <section name="cv" title="Parameters for the grid search / cross validation:" help="" expanded="false"> + <param name="skip_cv" argument="-cv:skip_cv" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Has to be set if the cv should be skipped and the model should just be trained with the specified parameters" help=""/> + <param name="number_of_runs" argument="-cv:number_of_runs" type="integer" optional="true" min="1" value="10" label="number of runs for the CV" help=""/> + <param name="number_of_partitions" argument="-cv:number_of_partitions" type="integer" optional="true" min="2" value="10" label="number of CV partitions" help=""/> + <param name="degree_start" argument="-cv:degree_start" type="integer" optional="true" min="1" value="1" label="starting point of degree" help=""/> + <param name="degree_step_size" argument="-cv:degree_step_size" type="integer" optional="true" value="2" label="step size point of degree" help=""/> + <param name="degree_stop" argument="-cv:degree_stop" type="integer" optional="true" value="4" label="stopping point of degree" help=""/> + <param name="c_start" argument="-cv:c_start" type="float" optional="true" value="1.0" label="starting point of c" help=""/> + <param name="c_step_size" argument="-cv:c_step_size" type="float" optional="true" value="100.0" label="step size of c" help=""/> + <param name="c_stop" argument="-cv:c_stop" type="float" optional="true" value="1000.0" label="stopping point of c" help=""/> + <param name="nu_start" argument="-cv:nu_start" type="float" optional="true" min="0.0" max="1.0" value="0.1" label="starting point of nu" help=""/> + <param name="nu_step_size" argument="-cv:nu_step_size" type="float" optional="true" value="1.3" label="step size of nu" help=""/> + <param name="nu_stop" argument="-cv:nu_stop" type="float" optional="true" min="0.0" max="1.0" value="0.9" label="stopping point of nu" help=""/> + <param name="sigma_start" argument="-cv:sigma_start" type="float" optional="true" value="1.0" label="starting point of sigma" help=""/> + <param name="sigma_step_size" argument="-cv:sigma_step_size" type="float" optional="true" value="1.3" label="step size of sigma" help=""/> + <param name="sigma_stop" argument="-cv:sigma_stop" type="float" optional="true" value="15.0" label="stopping point of sigma" 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> </inputs> <outputs> - <data name="param_out" format="txt"/> + <data name="out" label="${tool.name} on ${on_string}: out" 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> - <help>Trains a model for the prediction of proteotypic peptides from a training set. + <tests> + <expand macro="autotest_PTModel"/> + <expand macro="manutest_PTModel"/> + </tests> + <help><![CDATA[Trains a model for the prediction of proteotypic peptides from a training set. -For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_PTModel.html</help> +For more information, visit http://www.openms.de/documentation/TOPP_PTModel.html]]></help> + <expand macro="references"/> </tool>