Mercurial > repos > galaxyp > openms_highresprecursormasscorrector
diff HighResPrecursorMassCorrector.xml @ 11:8962ca0b2456 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:13:48 +0000 |
parents | a777f667393e |
children | cdbd06d8cbd5 |
line wrap: on
line diff
--- a/HighResPrecursorMassCorrector.xml Fri May 17 09:54:15 2019 -0400 +++ b/HighResPrecursorMassCorrector.xml Wed Sep 09 20:13:48 2020 +0000 @@ -1,104 +1,125 @@ <?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: [Signal processing and preprocessing]--> -<tool id="HighResPrecursorMassCorrector" name="HighResPrecursorMassCorrector" version="2.3.0"> +<tool id="HighResPrecursorMassCorrector" name="HighResPrecursorMassCorrector" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05"> <description>Corrects the precursor mass and charge determined by the instrument software.</description> <macros> <token name="@EXECUTABLE@">HighResPrecursorMassCorrector</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[HighResPrecursorMassCorrector + <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 && +#if "out_csv_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + mkdir out_csv && #end if -#if $param_out: - -out $param_out -#end if -#if $param_out_csv: - -out_csv $param_out_csv -#end if -#if $param_feature_in: - -feature:in $param_feature_in +#if $feature.in: + mkdir feature.in && + ln -s '$feature.in' 'feature.in/${re.sub("[^\w\-_]", "_", $feature.in.element_identifier)}.$gxy2omsext($feature.in.ext)' && #end if -#if $param_feature_mz_tolerance: - -feature:mz_tolerance $param_feature_mz_tolerance -#end if -#if $param_feature_mz_tolerance_unit: - -feature:mz_tolerance_unit - #if " " in str($param_feature_mz_tolerance_unit): - "$param_feature_mz_tolerance_unit" - #else - $param_feature_mz_tolerance_unit - #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 +'out/output.${gxy2omsext("mzml")}' +#if "out_csv_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + -out_csv + 'out_csv/output.${gxy2omsext("csv")}' #end if -#if $param_feature_rt_tolerance: - -feature:rt_tolerance $param_feature_rt_tolerance -#end if -#if $param_feature_believe_charge: - -feature:believe_charge +#if $feature.in: + -feature:in + 'feature.in/${re.sub("[^\w\-_]", "_", $feature.in.element_identifier)}.$gxy2omsext($feature.in.ext)' #end if -#if $param_feature_keep_original: - -feature:keep_original +#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0 + | tee '$stdout' #end if -#if $param_feature_assign_all_matching: - -feature:assign_all_matching + +## Postprocessing +&& mv 'out/output.${gxy2omsext("mzml")}' '$out' +#if "out_csv_FLAG" in str($OPTIONAL_OUTPUTS).split(',') + && mv 'out_csv/output.${gxy2omsext("csv")}' '$out_csv' #end if -#if $param_nearest_peak_mz_tolerance: - -nearest_peak:mz_tolerance $param_nearest_peak_mz_tolerance -#end if -#if $param_nearest_peak_mz_tolerance_unit: - -nearest_peak:mz_tolerance_unit - #if " " in str($param_nearest_peak_mz_tolerance_unit): - "$param_nearest_peak_mz_tolerance_unit" - #else - $param_nearest_peak_mz_tolerance_unit - #end if -#end if -#if $param_highest_intensity_peak_mz_tolerance: - -highest_intensity_peak:mz_tolerance $param_highest_intensity_peak_mz_tolerance -#end if -#if $adv_opts.adv_opts_selector=='advanced': - #if $adv_opts.param_force: - -force -#end if - #if $adv_opts.param_feature_max_trace: - -feature:max_trace $adv_opts.param_feature_max_trace -#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="mzml" optional="False" label="Input file (centroided data)" help="(-in) "/> - <param name="param_feature_in" type="data" format="featurexml" optional="True" label="Features used to correct precursor masses" help="(-in) "/> - <param name="param_feature_mz_tolerance" type="float" value="5.0" label="The precursor mass tolerance" help="(-mz_tolerance) Used to determine matching to feature mass traces"/> - <param name="param_feature_mz_tolerance_unit" display="radio" type="select" optional="False" value="ppm" label="Unit of precursor mass tolerance" help="(-mz_tolerance_unit) "> - <option value="Da">Da</option> - <option value="ppm" selected="true">ppm</option> + <param name="in" argument="-in" type="data" format="mzml" optional="false" label="Input file (centroided data)" help=" select mzml data sets(s)"/> + <section name="feature" title="Use features for precursor mass correction" help="" expanded="false"> + <param name="in" argument="-feature:in" type="data" format="featurexml" optional="true" label="Features used to correct precursor masses" help=" select featurexml data sets(s)"/> + <param name="mz_tolerance" argument="-feature:mz_tolerance" type="float" optional="true" value="5.0" label="The precursor mass tolerance" help="Used to determine matching to feature mass traces"/> + <param name="mz_tolerance_unit" argument="-feature:mz_tolerance_unit" display="radio" type="select" optional="false" label="Unit of precursor mass tolerance" help=""> + <option value="Da">Da</option> + <option value="ppm" selected="true">ppm</option> + <expand macro="list_string_san"/> + </param> + <param name="rt_tolerance" argument="-feature:rt_tolerance" type="float" optional="true" value="0.0" label="Additional retention time tolerance added to feature boundaries" help=""/> + <param name="max_trace" argument="-feature:max_trace" type="integer" optional="true" value="2" label="Maximum isotopic trace considered in matching a precursor to a feature" help=""/> + <param name="believe_charge" argument="-feature:believe_charge" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Assume precursor charge to be correct" help=""/> + <param name="keep_original" argument="-feature:keep_original" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Make a copy of the precursor and MS2 (true) or discard the original (false)" help=""/> + <param name="assign_all_matching" argument="-feature:assign_all_matching" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Correct a precursor using all matching features (true) or only the nearest (false)" help="Only evaluated if copies are created (feature:keep_original)"/> + </section> + <section name="nearest_peak" title="Use nearest centroided MS1 peak for precursor mass correction" help="" expanded="false"> + <param name="mz_tolerance" argument="-nearest_peak:mz_tolerance" type="float" optional="true" value="0.0" label="The precursor mass tolerance to find the closest MS1 peak" help="(Disable method by setting value to 0.0)"/> + <param name="mz_tolerance_unit" argument="-nearest_peak:mz_tolerance_unit" display="radio" type="select" optional="false" label="Unit of precursor mass tolerance" help=""> + <option value="Da">Da</option> + <option value="ppm" selected="true">ppm</option> + <expand macro="list_string_san"/> + </param> + </section> + <section name="highest_intensity_peak" title="Use centroided MS1 peak with the highest intensity in a certrain mass range - for precursor mass correction" help="" expanded="false"> + <param name="mz_tolerance" argument="-highest_intensity_peak:mz_tolerance" type="float" optional="true" value="0.0" label="The precursor mass tolerance to find the highest intensity MS1 peak" help="Suggested value 1/max. expected charge. (Disable method by setting value to 0.0)"/> + <param name="mz_tolerance_unit" argument="-highest_intensity_peak:mz_tolerance_unit" display="radio" type="select" optional="false" label="Unit of precursor mass tolerance" help=""> + <option value="Da">Da</option> + <option value="ppm" selected="true">ppm</option> + <expand macro="list_string_san"/> + </param> + </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="out_csv_FLAG">out_csv (Unit of precursor mass tolerance)</option> + <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option> </param> - <param name="param_feature_rt_tolerance" type="float" value="0.0" label="Additional retention time tolerance added to feature boundaries" help="(-rt_tolerance) "/> - <param name="param_feature_believe_charge" display="radio" type="boolean" truevalue="-feature:believe_charge" falsevalue="" checked="false" optional="True" label="Assume precursor charge to be correct" help="(-believe_charge) "/> - <param name="param_feature_keep_original" display="radio" type="boolean" truevalue="-feature:keep_original" falsevalue="" checked="false" optional="True" label="Make a copy of the precursor and MS2 (true) or discard the original (false)" help="(-keep_original) "/> - <param name="param_feature_assign_all_matching" display="radio" type="boolean" truevalue="-feature:assign_all_matching" falsevalue="" checked="false" optional="True" label="Correct a precursor using all matching features (true) or only the nearest (false)" help="(-assign_all_matching) Only evaluated if copies are created (feature:keep_original)"/> - <param name="param_nearest_peak_mz_tolerance" type="float" value="0.0" label="The precursor mass tolerance to find the closest MS1 peak" help="(-mz_tolerance) (Disable method by setting value to 0.0)"/> - <param name="param_nearest_peak_mz_tolerance_unit" display="radio" type="select" optional="False" value="ppm" label="Unit of precursor mass tolerance" help="(-mz_tolerance_unit) "> - <option value="Da">Da</option> - <option value="ppm" selected="true">ppm</option> - </param> - <param name="param_highest_intensity_peak_mz_tolerance" type="float" value="0.0" label="The precursor mass tolerance to find the highest intensity MS1 peak (Da)" help="(-mz_tolerance) Suggested value 1/max. expected charge. (Disable method by setting value to 0.0)"/> - <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_feature_max_trace" type="integer" value="2" label="Maximum isotopic trace considered in matching a precursor to a feature" help="(-max_trace) "/> - </expand> </inputs> <outputs> - <data name="param_out" format="mzml"/> - <data name="param_out_csv" format="tabular"/> + <data name="out" label="${tool.name} on ${on_string}: out" format="mzml"/> + <data name="out_csv" label="${tool.name} on ${on_string}: out_csv" format="csv"> + <filter>OPTIONAL_OUTPUTS is not None and "out_csv_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>Corrects the precursor mass and charge determined by the instrument software. + <tests> + <expand macro="autotest_HighResPrecursorMassCorrector"/> + <expand macro="manutest_HighResPrecursorMassCorrector"/> + </tests> + <help><![CDATA[Corrects the precursor mass and charge determined by the instrument software. -For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_HighResPrecursorMassCorrector.html</help> +For more information, visit http://www.openms.de/documentation/TOPP_HighResPrecursorMassCorrector.html]]></help> + <expand macro="references"/> </tool>