view IDMassAccuracy.xml @ 14:b889cb83a9e1 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 2adf8edc3de4e1cd3b299b26abb14544d17d0636"
author galaxyp
date Fri, 06 Nov 2020 20:39:42 +0000
parents 31bc4129f589
children 585f8235da7e
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="IDMassAccuracy" name="IDMassAccuracy" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
  <description>Calculates a distribution of the mass error from given mass spectra and IDs.</description>
  <macros>
    <token name="@EXECUTABLE@">IDMassAccuracy</token>
    <import>macros.xml</import>
    <import>macros_autotest.xml</import>
    <import>macros_test.xml</import>
  </macros>
  <expand macro="requirements"/>
  <expand macro="stdio"/>
  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
@EXT_FOO@
#import re

## Preprocessing
mkdir in &&
${ ' '.join(["ln -s '%s' 'in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _]) }
mkdir id_in &&
${ ' '.join(["ln -s '%s' 'id_in/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $id_in if _]) }
#if "out_precursor_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_precursor &&
#end if
#if "out_fragment_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_fragment &&
#end if
#if "out_precursor_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_precursor_fit &&
#end if
#if "out_fragment_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_fragment_fit &&
#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
${' '.join(["'in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in if _])}
-id_in
${' '.join(["'id_in/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $id_in if _])}
#if "out_precursor_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_precursor
  'out_precursor/output.${gxy2omsext("tabular")}'
#end if
#if "out_fragment_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_fragment
  'out_fragment/output.${gxy2omsext("tabular")}'
#end if
#if "out_precursor_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_precursor_fit
  'out_precursor_fit/output.${gxy2omsext("tabular")}'
#end if
#if "out_fragment_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_fragment_fit
  'out_fragment_fit/output.${gxy2omsext("tabular")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
#if "out_precursor_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_precursor/output.${gxy2omsext("tabular")}' '$out_precursor'
#end if
#if "out_fragment_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_fragment/output.${gxy2omsext("tabular")}' '$out_fragment'
#end if
#if "out_precursor_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_precursor_fit/output.${gxy2omsext("tabular")}' '$out_precursor_fit'
#end if
#if "out_fragment_fit_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_fragment_fit/output.${gxy2omsext("tabular")}' '$out_fragment_fit'
#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 name="in" argument="-in" type="data" format="mzml" multiple="true" optional="false" label="Input mzML file list, containing the spectra" help=" select mzml data sets(s)"/>
    <param name="id_in" argument="-id_in" type="data" format="idxml" multiple="true" optional="false" label="Input idXML file list, containing the identifications" help=" select idxml data sets(s)"/>
    <param name="precursor_error_ppm" argument="-precursor_error_ppm" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If this flag is used, the precursor mass tolerances are estimated in ppm instead of Da" help=""/>
    <param name="fragment_error_ppm" argument="-fragment_error_ppm" type="boolean" truevalue="true" falsevalue="false" checked="false" label="If this flag is used, the fragment mass tolerances are estimated in ppm instead of Da" help=""/>
    <param name="fragment_mass_tolerance" argument="-fragment_mass_tolerance" type="float" optional="true" value="0.5" label="Maximal fragment mass tolerance which is allowed for MS/MS spectra, used for the calculation of matching ions" help=""/>
    <expand macro="adv_opts_macro">
      <param name="number_of_bins" argument="-number_of_bins" type="integer" optional="true" min="10" value="100" label="Number of bins that should be used to calculate the histograms for the fitting" help=""/>
      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overrides 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" optional="true" multiple="true" label="Optional outputs">
      <option value="out_precursor_FLAG">out_precursor (Output file which contains the deviations from the precursors)</option>
      <option value="out_fragment_FLAG">out_fragment (Output file which contains the fragment ion m/z deviations)</option>
      <option value="out_precursor_fit_FLAG">out_precursor_fit (Gaussian fit to the histogram of mass deviations from the precursors)</option>
      <option value="out_fragment_fit_FLAG">out_fragment_fit (Gaussian fit to the histogram of mass deviations from the fragments)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out_precursor" label="${tool.name} on ${on_string}: out_precursor" format="tabular">
      <filter>OPTIONAL_OUTPUTS is not None and "out_precursor_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="out_fragment" label="${tool.name} on ${on_string}: out_fragment" format="tabular">
      <filter>OPTIONAL_OUTPUTS is not None and "out_fragment_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="out_precursor_fit" label="${tool.name} on ${on_string}: out_precursor_fit" format="tabular">
      <filter>OPTIONAL_OUTPUTS is not None and "out_precursor_fit_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="out_fragment_fit" label="${tool.name} on ${on_string}: out_fragment_fit" format="tabular">
      <filter>OPTIONAL_OUTPUTS is not None and "out_fragment_fit_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="stdout" format="txt" label="${tool.name} on ${on_string}: stdout">
      <filter>OPTIONAL_OUTPUTS is None</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>
    <expand macro="autotest_IDMassAccuracy"/>
    <expand macro="manutest_IDMassAccuracy"/>
  </tests>
  <help><![CDATA[Calculates a distribution of the mass error from given mass spectra and IDs.


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