view EICExtractor.xml @ 15:f253d41d9170 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:23:24 +0000
parents 0546885ddaf9
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="EICExtractor" name="EICExtractor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Extracts intensities from dedicates positions in a LC/MS map</description>
  <macros>
    <token name="@EXECUTABLE@">EICExtractor</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_cond.in &&
#if $in_cond.in_select == "no"
mkdir ${' '.join(["'in_cond.in/%s'" % (i) for i, f in enumerate($in_cond.in) if f])} && 
${' '.join(["ln -s '%s' 'in_cond.in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_cond.in) if f])}
#else
ln -s '$in_cond.in' 'in_cond.in/${re.sub("[^\w\-_]", "_", $in_cond.in.element_identifier)}.$gxy2omsext($in_cond.in.ext)' &&
#end if
#if $in_header_cond.in_header:
  mkdir in_header_cond.in_header &&
  #if $in_header_cond.in_header_select == "no"
  mkdir ${' '.join(["'in_header_cond.in_header/%s'" % (i) for i, f in enumerate($in_header_cond.in_header) if f])} && 
  ${' '.join(["ln -s '%s' 'in_header_cond.in_header/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_header_cond.in_header) if f])}
  #else
  ln -s '$in_header_cond.in_header' 'in_header_cond.in_header/${re.sub("[^\w\-_]", "_", $in_header_cond.in_header.element_identifier)}.$gxy2omsext($in_header_cond.in_header.ext)' &&
  #end if
#end if
mkdir pos &&
ln -s '$pos' 'pos/${re.sub("[^\w\-_]", "_", $pos.element_identifier)}.$gxy2omsext($pos.ext)' &&
mkdir out &&
#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir auto_rt_out_debug_TIC &&
#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
#if $in_cond.in_select == "no"
${' '.join(["'in_cond.in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_cond.in) if f])}
#else
'in_cond.in/${re.sub("[^\w\-_]", "_", $in_cond.in.element_identifier)}.$gxy2omsext($in_cond.in.ext)'
#end if
#if $in_header_cond.in_header:
  -in_header
  #if $in_header_cond.in_header_select == "no"
  ${' '.join(["'in_header_cond.in_header/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($in_header_cond.in_header) if f])}
  #else
  'in_header_cond.in_header/${re.sub("[^\w\-_]", "_", $in_header_cond.in_header.element_identifier)}.$gxy2omsext($in_header_cond.in_header.ext)'
  #end if
#end if
-pos
'pos/${re.sub("[^\w\-_]", "_", $pos.element_identifier)}.$gxy2omsext($pos.ext)'
-out
'out/output.${gxy2omsext("csv")}'
#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -auto_rt:out_debug_TIC
  'auto_rt_out_debug_TIC/output.${gxy2omsext("mzml")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
&& mv 'out/output.${gxy2omsext("csv")}' '$out'
#if "out_debug_TIC_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'auto_rt_out_debug_TIC/output.${gxy2omsext("mzml")}' '$auto_rt_out_debug_TIC'
#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>
    <conditional name="in_cond">
      <param name="in_select" type="select" label="Run tool in batch mode for -in">
        <option value="no">No: process all datasets jointly</option>
        <option value="yes">Yes: process each dataset in an independent job</option>
      </param>
      <when value="no">
        <param argument="-in" type="data" format="mzml" multiple="true" optional="false" label="Input raw data file" help=" select mzml data sets(s)"/>
      </when>
      <when value="yes">
        <param argument="-in" type="data" format="mzml" multiple="false" optional="false" label="Input raw data file" help=" select mzml data sets(s)"/>
      </when>
    </conditional>
    <conditional name="in_header_cond">
      <param name="in_header_select" type="select" label="Run tool in batch mode for -in_header">
        <option value="no">No: process all datasets jointly</option>
        <option value="yes">Yes: process each dataset in an independent job</option>
      </param>
      <when value="no">
        <param argument="-in_header" type="data" format="txt" multiple="true" optional="true" label="[for Waters data only] Read additional information from _HEADER.TXT" help="Provide one for each raw input file select txt data sets(s)"/>
      </when>
      <when value="yes">
        <param argument="-in_header" type="data" format="txt" multiple="false" optional="true" label="[for Waters data only] Read additional information from _HEADER.TXT" help="Provide one for each raw input file select txt data sets(s)"/>
      </when>
    </conditional>
    <param argument="-pos" type="data" format="edta" optional="false" label="Input config file stating where to find signal" help=" select edta data sets(s)"/>
    <param argument="-rt_tol" type="float" optional="true" value="3.0" label="RT tolerance in [s] for finding max peak (whole RT range around RT middle)" help=""/>
    <param argument="-mz_tol" type="float" optional="true" value="10.0" label="m/z tolerance in [ppm] for finding a peak" help=""/>
    <param argument="-rt_collect" type="integer" optional="true" value="1" label="# of scans up &amp; down in RT from highest point for ppm estimation in result" help=""/>
    <section name="auto_rt" title="Parameters for automatic detection of injection RT peaks (no need to specify them in 'pos' input file)" help="" expanded="false">
      <param name="enabled" argument="-auto_rt:enabled" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Automatically detect injection peaks from TIC and quantify all m/z x RT combinations" help=""/>
      <param name="FHWM" argument="-auto_rt:FHWM" type="float" optional="true" value="5.0" label="Expected full width at half-maximum of each raw RT peak in [s]" help="Gaussian smoothing filter with this width is applied to TIC"/>
      <param name="SNThreshold" argument="-auto_rt:SNThreshold" type="float" optional="true" value="5.0" label="S/N threshold for a smoothed raw peak to pass peak picking" help="Higher thesholds will result in less peaks"/>
    </section>
    <expand macro="adv_opts_macro">
      <param argument="-out_separator" type="text" optional="true" value="," label="Separator character for output CSV file" help="">
        <expand macro="list_string_san" name="out_separator"/>
      </param>
      <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_debug_TIC_FLAG">out_debug_TIC (Optional output file (for first input) containing the smoothed TIC, S/N levels and picked RT positions)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out" label="${tool.name} on ${on_string}: out" format="csv"/>
    <data name="auto_rt_out_debug_TIC" label="${tool.name} on ${on_string}: auto_rt:out_debug_TIC" format="mzml">
      <filter>OPTIONAL_OUTPUTS is not None and "out_debug_TIC_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><test expect_num_outputs="1"><!-- just using some random test data -->
    <param name="adv_opts|test" value="true"/>
    <param name="in" value="spectra.mzML"/>
    <param name="pos" ftype="edta" value="FileConverter_10_input.edta"/>
    <output name="out" ftype="csv" value="EICExtractor.csv" lines_diff="2"/>
  </test>
</tests>
  <help><![CDATA[Extracts intensities from dedicates positions in a LC/MS map


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