view Decharger.xml @ 17:566029692c59 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:12:29 +0000
parents 62cce3757d5b
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: [Quantitation]-->
<tool id="Decharger" name="Decharger" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Decharges and merges different feature charge variants of the same peptide.</description>
  <macros>
    <token name="@EXECUTABLE@">Decharger</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 &&
ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
mkdir out_cm &&
#if "out_fm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_fm &&
#end if
#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir outpairs &&
#end if

## 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_cm
'out_cm/output.${gxy2omsext("consensusxml")}'
#if "out_fm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_fm
  'out_fm/output.${gxy2omsext("featurexml")}'
#end if
#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -outpairs
  'outpairs/output.${gxy2omsext("consensusxml")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
&& mv 'out_cm/output.${gxy2omsext("consensusxml")}' '$out_cm'
#if "out_fm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_fm/output.${gxy2omsext("featurexml")}' '$out_fm'
#end if
#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'outpairs/output.${gxy2omsext("consensusxml")}' '$outpairs'
#end if
#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" type="data" format="featurexml" optional="false" label="input file" help=" select featurexml data sets(s)"/>
    <section name="algorithm" title="Feature decharging algorithm section" help="" expanded="false">
      <section name="FeatureDeconvolution" title="" help="" expanded="false">
        <param name="charge_min" argument="-algorithm:FeatureDeconvolution:charge_min" type="integer" optional="true" value="1" label="Minimal possible charge" help=""/>
        <param name="charge_max" argument="-algorithm:FeatureDeconvolution:charge_max" type="integer" optional="true" value="10" label="Maximal possible charge" help=""/>
        <param name="charge_span_max" argument="-algorithm:FeatureDeconvolution:charge_span_max" type="integer" optional="true" min="1" value="4" label="Maximal range of charges for a single analyte" help="i.e. observing q1=[5,6,7] implies span=3. Setting this to 1 will only find adduct variants of the same charge"/>
        <param name="q_try" argument="-algorithm:FeatureDeconvolution:q_try" type="select" optional="true" label="Try different values of charge for each feature according to the above settings ('heuristic' [does not test all charges, just the likely ones] or 'all' ), or leave feature charge untouched ('feature')" help="">
          <option value="feature" selected="true">feature</option>
          <option value="heuristic">heuristic</option>
          <option value="all">all</option>
          <expand macro="list_string_san" name="q_try"/>
        </param>
        <param name="retention_max_diff" argument="-algorithm:FeatureDeconvolution:retention_max_diff" type="float" optional="true" value="1.0" label="Maximum allowed RT difference between any two features if their relation shall be determined" help=""/>
        <param name="retention_max_diff_local" argument="-algorithm:FeatureDeconvolution:retention_max_diff_local" type="float" optional="true" value="1.0" label="Maximum allowed RT difference between between two co-features, after adduct shifts have been accounted for (if you do not have any adduct shifts, this value should be equal to 'retention_max_diff', otherwise it should be smaller!)" help=""/>
        <param name="mass_max_diff" argument="-algorithm:FeatureDeconvolution:mass_max_diff" type="float" optional="true" value="0.5" label="Maximum allowed mass difference [in Th] for a single feature" help=""/>
        <param name="potential_adducts" argument="-algorithm:FeatureDeconvolution:potential_adducts" type="text" optional="true" value="K:+:0.1" label="Adducts used to explain mass differences in format: 'Element:Charge(+/-):Probability[:RTShift[:Label]]'" help="i.e. the number of '+' or '-' indicate the charge, e.g. 'Ca:++:0.5' indicates +2. Probabilites have to be in (0,1]. RTShift param is optional and indicates the expected RT shift caused by this adduct, e.g. '(2)H4H-4:0:1:-3' indicates a 4 deuterium label, which causes early elution by 3 seconds. As a fifth parameter you can add a label which is tagged on every feature which has this adduct. This also determines the map number in the consensus file (space separated list, in order to allow for spaces in list items surround them by single quotes)">
          <expand macro="list_string_val" name="potential_adducts"/>
          <expand macro="list_string_san" name="potential_adducts"/>
        </param>
        <param name="max_neutrals" argument="-algorithm:FeatureDeconvolution:max_neutrals" type="integer" optional="true" value="0" label="Maximal number of neutral adducts(q=0) allowed" help="Add them in the 'potential_adducts' section!"/>
        <param name="max_minority_bound" argument="-algorithm:FeatureDeconvolution:max_minority_bound" type="integer" optional="true" min="0" value="2" label="Maximum count of the least probable adduct (according to 'potential_adducts' param) within a charge variant" help="E.g. setting this to 2 will not allow an adduct composition of '1(H+),3(Na+)' if Na+ is the least probable adduct"/>
        <param name="min_rt_overlap" argument="-algorithm:FeatureDeconvolution:min_rt_overlap" type="float" optional="true" min="0.0" max="1.0" value="0.66" label="Minimum overlap of the convex hull' RT intersection measured against the union from two features (if CHs are given)" help=""/>
        <param name="intensity_filter" argument="-algorithm:FeatureDeconvolution:intensity_filter" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Enable the intensity filter, which will only allow edges between two equally charged features if the intensity of the feature with less likely adducts is smaller than that of the other feature" help="It is not used for features of different charge"/>
        <param name="negative_mode" argument="-algorithm:FeatureDeconvolution:negative_mode" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Enable negative ionization mode" help=""/>
        <param name="default_map_label" argument="-algorithm:FeatureDeconvolution:default_map_label" type="text" optional="true" value="decharged features" label="Label of map in output consensus file where all features are put by default" help="">
          <expand macro="list_string_san" name="default_map_label"/>
        </param>
        <param name="verbose_level" argument="-algorithm:FeatureDeconvolution:verbose_level" type="integer" optional="true" min="0" max="3" value="0" label="Amount of debug information given during processing" help=""/>
      </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="out_fm_FLAG">out_fm (output feature map)</option>
      <option value="outpairs_FLAG">outpairs (output file)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out_cm" label="${tool.name} on ${on_string}: out_cm" format="consensusxml"/>
    <data name="out_fm" label="${tool.name} on ${on_string}: out_fm" format="featurexml">
      <filter>OPTIONAL_OUTPUTS is not None and "out_fm_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="outpairs" label="${tool.name} on ${on_string}: outpairs" format="consensusxml">
      <filter>OPTIONAL_OUTPUTS is not None and "outpairs_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>
  <tests><!-- TOPP_Decharger_1 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="Decharger_input.featureXML"/>
      <output name="out_cm" file="Decharger_output.consensusXML" compare="sim_size" delta_frac="0.7" ftype="consensusxml"/>
      <output name="out_fm" file="Decharger_output_fm.tmp.featureXML" compare="sim_size" delta_frac="0.7" ftype="featurexml"/>
      <output name="outpairs" file="Decharger_output_pairs.consensusXML" compare="sim_size" delta_frac="0.7" ftype="consensusxml"/>
      <section name="algorithm">
        <section name="FeatureDeconvolution">
          <param name="charge_min" value="1"/>
          <param name="charge_max" value="10"/>
          <param name="charge_span_max" value="4"/>
          <param name="q_try" value="feature"/>
          <param name="retention_max_diff" value="1.0"/>
          <param name="retention_max_diff_local" value="1.0"/>
          <param name="mass_max_diff" value="0.1"/>
          <param name="potential_adducts" value="&quot;H:+:0.7&quot; &quot;Na:+:0.1&quot; &quot;(2)H4H-4:0:0.1:-2:heavy&quot;"/>
          <param name="max_neutrals" value="0"/>
          <param name="max_minority_bound" value="2"/>
          <param name="min_rt_overlap" value="0.66"/>
          <param name="intensity_filter" value="false"/>
          <param name="negative_mode" value="false"/>
          <param name="default_map_label" value="decharged features"/>
          <param name="verbose_level" value="0"/>
        </section>
      </section>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_fm_FLAG,outpairs_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[Decharges and merges different feature charge variants of the same peptide.


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