Mercurial > repos > galaxyp > openms_metaboliteadductdecharger
diff MetaboliteAdductDecharger.xml @ 4:68e3317532cb 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:01:24 +0000 |
parents | d37e3dc967b9 |
children | ebc51eae71cd |
line wrap: on
line diff
--- a/MetaboliteAdductDecharger.xml Fri May 17 09:19:45 2019 -0400 +++ b/MetaboliteAdductDecharger.xml Wed Sep 09 20:01:24 2020 +0000 @@ -1,148 +1,140 @@ <?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="MetaboliteAdductDecharger" name="MetaboliteAdductDecharger" version="2.3.0"> +<tool id="MetaboliteAdductDecharger" name="MetaboliteAdductDecharger" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05"> <description>Decharges and merges different feature charge variants of the same metabolite.</description> <macros> <token name="@EXECUTABLE@">MetaboliteAdductDecharger</token> <import>macros.xml</import> + <import>macros_autotest.xml</import> + <import>macros_test.xml</import> </macros> - <expand macro="references"/> - <expand macro="stdio"/> <expand macro="requirements"/> - <command detect_errors="aggressive"><![CDATA[MetaboliteAdductDecharger + <expand macro="stdio"/> + <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@ +@EXT_FOO@ +#import re -#if $param_in: - -in $param_in +## 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 $param_out_cm: - -out_cm $param_out_cm -#end if -#if $param_out_fm: - -out_fm $param_out_fm -#end if -#if $param_outpairs: - -outpairs $param_outpairs -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_charge_min: - -algorithm:MetaboliteFeatureDeconvolution:charge_min $param_algorithm_MetaboliteFeatureDeconvolution_charge_min +#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + mkdir outpairs && #end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_charge_max: - -algorithm:MetaboliteFeatureDeconvolution:charge_max $param_algorithm_MetaboliteFeatureDeconvolution_charge_max -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_charge_span_max: - -algorithm:MetaboliteFeatureDeconvolution:charge_span_max $param_algorithm_MetaboliteFeatureDeconvolution_charge_span_max + +## 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 $param_algorithm_MetaboliteFeatureDeconvolution_q_try: - -algorithm:MetaboliteFeatureDeconvolution:q_try - #if " " in str($param_algorithm_MetaboliteFeatureDeconvolution_q_try): - "$param_algorithm_MetaboliteFeatureDeconvolution_q_try" - #else - $param_algorithm_MetaboliteFeatureDeconvolution_q_try - #end if +#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + -outpairs + 'outpairs/output.${gxy2omsext("consensusxml")}' #end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff: - -algorithm:MetaboliteFeatureDeconvolution:retention_max_diff $param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff_local: - -algorithm:MetaboliteFeatureDeconvolution:retention_max_diff_local $param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff_local -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_mass_max_diff: - -algorithm:MetaboliteFeatureDeconvolution:mass_max_diff $param_algorithm_MetaboliteFeatureDeconvolution_mass_max_diff +#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0 + | tee '$stdout' #end if -#if $rep_param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts: --algorithm:MetaboliteFeatureDeconvolution:potential_adducts - #for token in $rep_param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts: - #if " " in str(token): - "$token.param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts" - #else - $token.param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts - #end if - #end for +## 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 $param_algorithm_MetaboliteFeatureDeconvolution_max_neutrals: - -algorithm:MetaboliteFeatureDeconvolution:max_neutrals $param_algorithm_MetaboliteFeatureDeconvolution_max_neutrals -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_max_minority_bound: - -algorithm:MetaboliteFeatureDeconvolution:max_minority_bound $param_algorithm_MetaboliteFeatureDeconvolution_max_minority_bound -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_min_rt_overlap: - -algorithm:MetaboliteFeatureDeconvolution:min_rt_overlap $param_algorithm_MetaboliteFeatureDeconvolution_min_rt_overlap +#if "outpairs_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + && mv 'outpairs/output.${gxy2omsext("consensusxml")}' '$outpairs' #end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_intensity_filter: - -algorithm:MetaboliteFeatureDeconvolution:intensity_filter -#end if -#if $param_algorithm_MetaboliteFeatureDeconvolution_negative_mode: - -algorithm:MetaboliteFeatureDeconvolution:negative_mode "$param_algorithm_MetaboliteFeatureDeconvolution_negative_mode" -#end if -#if $adv_opts.adv_opts_selector=='advanced': - #if $adv_opts.param_force: - -force -#end if - #if $adv_opts.param_algorithm_MetaboliteFeatureDeconvolution_default_map_label: - -algorithm:MetaboliteFeatureDeconvolution:default_map_label "$adv_opts.param_algorithm_MetaboliteFeatureDeconvolution_default_map_label" -#end if - #if $adv_opts.param_algorithm_MetaboliteFeatureDeconvolution_verbose_level: - -algorithm:MetaboliteFeatureDeconvolution:verbose_level $adv_opts.param_algorithm_MetaboliteFeatureDeconvolution_verbose_level -#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="featurexml" optional="False" label="input file" help="(-in) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_charge_min" type="integer" value="1" label="Minimal possible charge" help="(-charge_min) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_charge_max" type="integer" value="3" label="Maximal possible charge" help="(-charge_max) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_charge_span_max" type="integer" min="1" optional="True" value="3" label="Maximal range of charges for a single analyte, i.e" help="(-charge_span_max) observing q1=[5,6,7] implies span=3. Setting this to 1 will only find adduct variants of the same charge"/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_q_try" display="radio" type="select" optional="False" value="feature" 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="(-q_try) "> - <option value="feature" selected="true">feature</option> - <option value="heuristic">heuristic</option> - <option value="all">all</option> - </param> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff" type="float" value="1.0" label="Maximum allowed RT difference between any two features if their relation shall be determined" help="(-retention_max_diff) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_retention_max_diff_local" type="float" 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="(-retention_max_diff_local) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_mass_max_diff" type="float" value="0.05" label="Maximum allowed mass difference [in Th] for a single feature" help="(-mass_max_diff) "/> - <repeat name="rep_param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts" min="0" max="1" title="param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts"> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_potential_adducts" type="text" size="30" value="K:+:0.1" label="Adducts used to explain mass differences in format: 'Element:Charge(+/-):Probability[:RTShift[:Label]]', i.e. the number of '+' or '-' indicate the charge," help="(-potential_adducts) 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"> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> + <param name="in" 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="MetaboliteFeatureDeconvolution" title="" help="" expanded="false"> + <param name="charge_min" argument="-algorithm:MetaboliteFeatureDeconvolution:charge_min" type="integer" optional="true" value="1" label="Minimal possible charge" help=""/> + <param name="charge_max" argument="-algorithm:MetaboliteFeatureDeconvolution:charge_max" type="integer" optional="true" value="3" label="Maximal possible charge" help=""/> + <param name="charge_span_max" argument="-algorithm:MetaboliteFeatureDeconvolution:charge_span_max" type="integer" optional="true" min="1" value="3" 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:MetaboliteFeatureDeconvolution:q_try" display="radio" type="select" optional="false" 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"/> + </param> + <param name="retention_max_diff" argument="-algorithm:MetaboliteFeatureDeconvolution: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:MetaboliteFeatureDeconvolution: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:MetaboliteFeatureDeconvolution:mass_max_diff" type="float" optional="true" min="0.0" value="0.05" label="Maximum allowed mass tolerance per feature" help="Defines a symmetric tolerance window around the feature. When looking at possible feature pairs, the allowed feature-wise errors are combined for consideration of possible adduct shifts. For ppm tolerances, each window is based on the respective observed feature mz (instead of putative experimental mzs causing the observed one)!"/> + <param name="unit" argument="-algorithm:MetaboliteFeatureDeconvolution:unit" display="radio" type="select" optional="false" label="Unit of the 'max_difference' paramete" help=""> + <option value="Da" selected="true">Da</option> + <option value="ppm">ppm</option> + <expand macro="list_string_san"/> + </param> + <param name="potential_adducts" argument="-algorithm:MetaboliteFeatureDeconvolution:potential_adducts" type="text" optional="true" value="H:+:0.4 Na:+:0.25 NH4:+:0.25 K:+:0.1 H-2O-1:0:0.05" label="Adducts used to explain mass differences in format: 'Elements:Charge(+/-/0):Probability[:RTShift[:Label]]'" help="i.e. the number of '+' or '-' indicate the charge ('0' if neutral adduct), e.g. 'Ca:++:0.5' indicates +2. Probabilites have to be in (0,1]. The optional RTShift param 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 fifth parameter you can add a label for every feature with this adduct. This also determines the map number in the consensus file. Adduct element losses are written in the form 'H-2'. All provided adducts need to have the same charge sign or be neutral! Mixing of adducts with different charge directions is only allowed as neutral complexes. For example, 'H-1Na:0:0.05' can be used to model Sodium gains (with balancing deprotonation) in negative mode (space separated list, in order to allow for spaces in list items surround them by single quotes)"> + <expand macro="list_string_val"/> + <expand macro="list_string_san"/> + </param> + <param name="max_neutrals" argument="-algorithm:MetaboliteFeatureDeconvolution:max_neutrals" type="integer" optional="true" value="1" label="Maximal number of neutral adducts(q=0) allowed" help="Add them in the 'potential_adducts' section!"/> + <param name="use_minority_bound" argument="-algorithm:MetaboliteFeatureDeconvolution:use_minority_bound" type="text" optional="true" value="true" label="Prune the considered adduct transitions by transition probabilities" help=""> + <expand macro="list_string_san"/> + </param> + <param name="max_minority_bound" argument="-algorithm:MetaboliteFeatureDeconvolution:max_minority_bound" type="integer" optional="true" min="0" value="3" label="Limits allowed adduct compositions and changes between compositions in the underlying graph optimization problem by introducing a probability-based threshold: the minority bound sets the maximum count of the least probable adduct (according to 'potential_adducts' param) within a charge variant with maximum charge only containing the most likely adduct otherwise" help="E.g., for 'charge_max' 4 and 'max_minority_bound' 2 with most probable adduct being H+ and least probable adduct being Na+, this will allow adduct compositions of '2(H+),2(Na+)' but not of '1(H+),3(Na+)'. Further, adduct compositions/changes less likely than '2(H+),2(Na+)' will be discarded as well"/> + <param name="min_rt_overlap" argument="-algorithm:MetaboliteFeatureDeconvolution: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:MetaboliteFeatureDeconvolution: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:MetaboliteFeatureDeconvolution:negative_mode" type="text" optional="true" value="false" label="Enable negative ionization mode" help=""> + <expand macro="list_string_san"/> + </param> + <param name="default_map_label" argument="-algorithm:MetaboliteFeatureDeconvolution: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"/> + </param> + <param name="verbose_level" argument="-algorithm:MetaboliteFeatureDeconvolution: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 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> - </repeat> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_max_neutrals" type="integer" value="0" label="Maximal number of neutral adducts(q=0) allowed" help="(-max_neutrals) Add them in the 'potential_adducts' section!"/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_max_minority_bound" type="integer" min="0" optional="True" value="2" label="Maximum count of the least probable adduct (according to 'potential_adducts' param) within a charge variant" help="(-max_minority_bound) 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="param_algorithm_MetaboliteFeatureDeconvolution_min_rt_overlap" type="float" min="0.0" max="1.0" optional="True" value="0.66" label="Minimum overlap of the convex hull' RT intersection measured against the union from two features (if CHs are given)" help="(-min_rt_overlap) "/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_intensity_filter" display="radio" type="boolean" truevalue="-algorithm:MetaboliteFeatureDeconvolution:intensity_filter" falsevalue="" checked="false" optional="True" 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="(-intensity_filter) It is not used for features of different charge"/> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_negative_mode" type="text" size="30" value="false" label="Enable negative ionization mode" help="(-negative_mode) "> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> + </expand> + <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true"> + <option value="out_fm_FLAG">out_fm (Amount of debug information given during processing)</option> + <option value="outpairs_FLAG">outpairs (Amount of debug information given during processing)</option> + <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option> </param> - <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="param_algorithm_MetaboliteFeatureDeconvolution_default_map_label" type="text" size="30" value="decharged features" label="Label of map in output consensus file where all features are put by default" help="(-default_map_label) "> - <sanitizer> - <valid initial="string.printable"> - <remove value="'"/> - <remove value="""/> - </valid> - </sanitizer> - </param> - <param name="param_algorithm_MetaboliteFeatureDeconvolution_verbose_level" type="integer" min="0" max="3" optional="True" value="0" label="Amount of debug information given during processing" help="(-verbose_level) "/> - </expand> </inputs> <outputs> - <data name="param_out_cm" format="consensusxml"/> - <data name="param_out_fm" format="featurexml"/> - <data name="param_outpairs" format="consensusxml"/> + <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> - <help>Decharges and merges different feature charge variants of the same metabolite. + <tests> + <expand macro="autotest_MetaboliteAdductDecharger"/> + <expand macro="manutest_MetaboliteAdductDecharger"/> + </tests> + <help><![CDATA[Decharges and merges different feature charge variants of the same metabolite. -For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/UTILS_MetaboliteAdductDecharger.html</help> +For more information, visit http://www.openms.de/documentation/UTILS_MetaboliteAdductDecharger.html]]></help> + <expand macro="references"/> </tool>