<?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: [Test]-->
<tool id="ofile-corresponding-input" name="ofile-corresponding-input" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
  <description>Outut File parameter tests-corresponding-input</description>
  <macros>
    <token name="@EXECUTABLE@">ofile-corresponding-input</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 mandatory_noformat &&
#if "optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_noformat &&
#end if
mkdir mandatory_oneformat &&
#if "optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_oneformat &&
#end if
mkdir mandatory_multformat &&
#if "optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_multformat &&
#end if
mkdir mandatory_noformat_adv &&
#if "optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_noformat_adv &&
#end if
mkdir mandatory_oneformat_adv &&
#if "optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_oneformat_adv &&
#end if
mkdir mandatory_multformat_adv &&
#if "optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir optional_multformat_adv &&
#end if
mkdir input_noformat &&
ln -s '$input_noformat' 'input_noformat/${re.sub("[^\w\-_]", "_", $input_noformat.element_identifier)}.$gxy2omsext($input_noformat.ext)' &&
mkdir input_oneformat &&
ln -s '$input_oneformat' 'input_oneformat/${re.sub("[^\w\-_]", "_", $input_oneformat.element_identifier)}.$gxy2omsext($input_oneformat.ext)' &&
mkdir input_multformat &&
ln -s '$input_multformat' 'input_multformat/${re.sub("[^\w\-_]", "_", $input_multformat.element_identifier)}.$gxy2omsext($input_multformat.ext)' &&
mkdir test_section_sect_mandatory_noformat &&
#if "sect_optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_noformat &&
#end if
mkdir test_section_sect_mandatory_oneformat &&
#if "sect_optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_oneformat &&
#end if
mkdir test_section_sect_mandatory_multformat &&
#if "sect_optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_multformat &&
#end if
mkdir test_section_sect_mandatory_noformat_adv &&
#if "sect_optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_noformat_adv &&
#end if
mkdir test_section_sect_mandatory_oneformat_adv &&
#if "sect_optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_oneformat_adv &&
#end if
mkdir test_section_sect_mandatory_multformat_adv &&
#if "sect_optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir test_section_sect_optional_multformat_adv &&
#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
-mandatory_noformat
'mandatory_noformat/output.${gxy2omsext("txt")}'
#if "optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_noformat
  'optional_noformat/output.${gxy2omsext("txt")}'
#end if
-mandatory_oneformat
'mandatory_oneformat/output.${gxy2omsext("tsv")}'
#if "optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_oneformat
  'optional_oneformat/output.${gxy2omsext("tsv")}'
#end if
-mandatory_multformat
'mandatory_multformat/output.${input_multformat.ext}'
#if "optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_multformat
  'optional_multformat/output.${input_multformat.ext}'
#end if
-mandatory_noformat_adv
'mandatory_noformat_adv/output.${gxy2omsext("txt")}'
#if "optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_noformat_adv
  'optional_noformat_adv/output.${gxy2omsext("txt")}'
#end if
-mandatory_oneformat_adv
'mandatory_oneformat_adv/output.${gxy2omsext("tsv")}'
#if "optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_oneformat_adv
  'optional_oneformat_adv/output.${gxy2omsext("tsv")}'
#end if
-mandatory_multformat_adv
'mandatory_multformat_adv/output.${input_multformat.ext}'
#if "optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -optional_multformat_adv
  'optional_multformat_adv/output.${input_multformat.ext}'
#end if
-input_noformat
'input_noformat/${re.sub("[^\w\-_]", "_", $input_noformat.element_identifier)}.$gxy2omsext($input_noformat.ext)'
-input_oneformat
'input_oneformat/${re.sub("[^\w\-_]", "_", $input_oneformat.element_identifier)}.$gxy2omsext($input_oneformat.ext)'
-input_multformat
'input_multformat/${re.sub("[^\w\-_]", "_", $input_multformat.element_identifier)}.$gxy2omsext($input_multformat.ext)'
-test_section:sect_mandatory_noformat
'test_section_sect_mandatory_noformat/output.${gxy2omsext("txt")}'
#if "sect_optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_noformat
  'test_section_sect_optional_noformat/output.${gxy2omsext("txt")}'
#end if
-test_section:sect_mandatory_oneformat
'test_section_sect_mandatory_oneformat/output.${gxy2omsext("tsv")}'
#if "sect_optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_oneformat
  'test_section_sect_optional_oneformat/output.${gxy2omsext("tsv")}'
#end if
-test_section:sect_mandatory_multformat
'test_section_sect_mandatory_multformat/output.${input_multformat.ext}'
#if "sect_optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_multformat
  'test_section_sect_optional_multformat/output.${input_multformat.ext}'
#end if
-test_section:sect_mandatory_noformat_adv
'test_section_sect_mandatory_noformat_adv/output.${gxy2omsext("txt")}'
#if "sect_optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_noformat_adv
  'test_section_sect_optional_noformat_adv/output.${gxy2omsext("txt")}'
#end if
-test_section:sect_mandatory_oneformat_adv
'test_section_sect_mandatory_oneformat_adv/output.${gxy2omsext("tsv")}'
#if "sect_optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_oneformat_adv
  'test_section_sect_optional_oneformat_adv/output.${gxy2omsext("tsv")}'
#end if
-test_section:sect_mandatory_multformat_adv
'test_section_sect_mandatory_multformat_adv/output.${input_multformat.ext}'
#if "sect_optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -test_section:sect_optional_multformat_adv
  'test_section_sect_optional_multformat_adv/output.${input_multformat.ext}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
&& mv 'mandatory_noformat/output.${gxy2omsext("txt")}' '$mandatory_noformat'
#if "optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_noformat/output.${gxy2omsext("txt")}' '$optional_noformat'
#end if
&& mv 'mandatory_oneformat/output.${gxy2omsext("tsv")}' '$mandatory_oneformat'
#if "optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_oneformat/output.${gxy2omsext("tsv")}' '$optional_oneformat'
#end if
&& mv 'mandatory_multformat/output.${input_multformat.ext}' '$mandatory_multformat'
#if "optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_multformat/output.${input_multformat.ext}' '$optional_multformat'
#end if
&& mv 'mandatory_noformat_adv/output.${gxy2omsext("txt")}' '$mandatory_noformat_adv'
#if "optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_noformat_adv/output.${gxy2omsext("txt")}' '$optional_noformat_adv'
#end if
&& mv 'mandatory_oneformat_adv/output.${gxy2omsext("tsv")}' '$mandatory_oneformat_adv'
#if "optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_oneformat_adv/output.${gxy2omsext("tsv")}' '$optional_oneformat_adv'
#end if
&& mv 'mandatory_multformat_adv/output.${input_multformat.ext}' '$mandatory_multformat_adv'
#if "optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'optional_multformat_adv/output.${input_multformat.ext}' '$optional_multformat_adv'
#end if
&& mv 'test_section_sect_mandatory_noformat/output.${gxy2omsext("txt")}' '$test_section_sect_mandatory_noformat'
#if "sect_optional_noformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_noformat/output.${gxy2omsext("txt")}' '$test_section_sect_optional_noformat'
#end if
&& mv 'test_section_sect_mandatory_oneformat/output.${gxy2omsext("tsv")}' '$test_section_sect_mandatory_oneformat'
#if "sect_optional_oneformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_oneformat/output.${gxy2omsext("tsv")}' '$test_section_sect_optional_oneformat'
#end if
&& mv 'test_section_sect_mandatory_multformat/output.${input_multformat.ext}' '$test_section_sect_mandatory_multformat'
#if "sect_optional_multformat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_multformat/output.${input_multformat.ext}' '$test_section_sect_optional_multformat'
#end if
&& mv 'test_section_sect_mandatory_noformat_adv/output.${gxy2omsext("txt")}' '$test_section_sect_mandatory_noformat_adv'
#if "sect_optional_noformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_noformat_adv/output.${gxy2omsext("txt")}' '$test_section_sect_optional_noformat_adv'
#end if
&& mv 'test_section_sect_mandatory_oneformat_adv/output.${gxy2omsext("tsv")}' '$test_section_sect_mandatory_oneformat_adv'
#if "sect_optional_oneformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_oneformat_adv/output.${gxy2omsext("tsv")}' '$test_section_sect_optional_oneformat_adv'
#end if
&& mv 'test_section_sect_mandatory_multformat_adv/output.${input_multformat.ext}' '$test_section_sect_mandatory_multformat_adv'
#if "sect_optional_multformat_adv_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'test_section_sect_optional_multformat_adv/output.${input_multformat.ext}' '$test_section_sect_optional_multformat_adv'
#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[{}]]></configfile>
  </configfiles>
  <inputs>
    <param name="input_noformat" argument="-input_noformat" type="data" format="txt" optional="false" label="input file" help=" select txt data sets(s)"/>
    <param name="input_oneformat" argument="-input_oneformat" type="data" format="tsv" optional="false" label="input file" help=" select tsv data sets(s)"/>
    <param name="input_multformat" argument="-input_multformat" type="data" format="tabular,tsv" optional="false" label="input file" help=" select tabular,tsv data sets(s)"/>
    <expand macro="adv_opts_macro"/>
    <param name="OPTIONAL_OUTPUTS" type="select" optional="true" multiple="true" label="Optional outputs">
      <option value="optional_noformat_FLAG">optional_noformat (output file)</option>
      <option value="optional_oneformat_FLAG">optional_oneformat (output file)</option>
      <option value="optional_multformat_FLAG">optional_multformat (output file)</option>
      <option value="optional_noformat_adv_FLAG">optional_noformat_adv (output file)</option>
      <option value="optional_oneformat_adv_FLAG">optional_oneformat_adv (output file)</option>
      <option value="optional_multformat_adv_FLAG">optional_multformat_adv (output file)</option>
      <option value="sect_optional_noformat_FLAG">sect_optional_noformat (output file)</option>
      <option value="sect_optional_oneformat_FLAG">sect_optional_oneformat (output file)</option>
      <option value="sect_optional_multformat_FLAG">sect_optional_multformat (output file)</option>
      <option value="sect_optional_noformat_adv_FLAG">sect_optional_noformat_adv (output file)</option>
      <option value="sect_optional_oneformat_adv_FLAG">sect_optional_oneformat_adv (output file)</option>
      <option value="sect_optional_multformat_adv_FLAG">sect_optional_multformat_adv (output file)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="mandatory_noformat" label="${tool.name} on ${on_string}: mandatory_noformat" format="txt"/>
    <data name="optional_noformat" label="${tool.name} on ${on_string}: optional_noformat" format="txt">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_noformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="mandatory_oneformat" label="${tool.name} on ${on_string}: mandatory_oneformat" format="tsv"/>
    <data name="optional_oneformat" label="${tool.name} on ${on_string}: optional_oneformat" format="tsv">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_oneformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="mandatory_multformat" label="${tool.name} on ${on_string}: mandatory_multformat" format_source="input_multformat" metadata_source="input_multformat"/>
    <data name="optional_multformat" label="${tool.name} on ${on_string}: optional_multformat" format_source="input_multformat" metadata_source="input_multformat">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_multformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="mandatory_noformat_adv" label="${tool.name} on ${on_string}: mandatory_noformat_adv" format="txt"/>
    <data name="optional_noformat_adv" label="${tool.name} on ${on_string}: optional_noformat_adv" format="txt">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_noformat_adv_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="mandatory_oneformat_adv" label="${tool.name} on ${on_string}: mandatory_oneformat_adv" format="tsv"/>
    <data name="optional_oneformat_adv" label="${tool.name} on ${on_string}: optional_oneformat_adv" format="tsv">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_oneformat_adv_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="mandatory_multformat_adv" label="${tool.name} on ${on_string}: mandatory_multformat_adv" format_source="input_multformat" metadata_source="input_multformat"/>
    <data name="optional_multformat_adv" label="${tool.name} on ${on_string}: optional_multformat_adv" format_source="input_multformat" metadata_source="input_multformat">
      <filter>OPTIONAL_OUTPUTS is not None and "optional_multformat_adv_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_noformat" label="${tool.name} on ${on_string}: test_section:sect_mandatory_noformat" format="txt"/>
    <data name="test_section_sect_optional_noformat" label="${tool.name} on ${on_string}: test_section:sect_optional_noformat" format="txt">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_noformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_oneformat" label="${tool.name} on ${on_string}: test_section:sect_mandatory_oneformat" format="tsv"/>
    <data name="test_section_sect_optional_oneformat" label="${tool.name} on ${on_string}: test_section:sect_optional_oneformat" format="tsv">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_oneformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_multformat" label="${tool.name} on ${on_string}: test_section:sect_mandatory_multformat" format_source="input_multformat" metadata_source="input_multformat"/>
    <data name="test_section_sect_optional_multformat" label="${tool.name} on ${on_string}: test_section:sect_optional_multformat" format_source="input_multformat" metadata_source="input_multformat">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_multformat_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_noformat_adv" label="${tool.name} on ${on_string}: test_section:sect_mandatory_noformat_adv" format="txt"/>
    <data name="test_section_sect_optional_noformat_adv" label="${tool.name} on ${on_string}: test_section:sect_optional_noformat_adv" format="txt">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_noformat_adv_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_oneformat_adv" label="${tool.name} on ${on_string}: test_section:sect_mandatory_oneformat_adv" format="tsv"/>
    <data name="test_section_sect_optional_oneformat_adv" label="${tool.name} on ${on_string}: test_section:sect_optional_oneformat_adv" format="tsv">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_oneformat_adv_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="test_section_sect_mandatory_multformat_adv" label="${tool.name} on ${on_string}: test_section:sect_mandatory_multformat_adv" format_source="input_multformat" metadata_source="input_multformat"/>
    <data name="test_section_sect_optional_multformat_adv" label="${tool.name} on ${on_string}: test_section:sect_optional_multformat_adv" format_source="input_multformat" metadata_source="input_multformat">
      <filter>OPTIONAL_OUTPUTS is not None and "sect_optional_multformat_adv_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="12">
      <param name="input_noformat" ftype="txt" value="0test.ext"/>
      <param name="input_oneformat" ftype="tsv" value="1test.ext"/>
      <param name="input_multformat" ftype="tabular" value="2test.ext"/>
      <conditional name="adv_opts_cond">
        <param name="adv_opts_selector" value="advanced"/>
      </conditional>
      <output name="mandatory_noformat" ftype="txt" value="outfile.txt"/>
      <output name="mandatory_oneformat" ftype="tsv" value="outfile.txt"/>
      <output name="mandatory_multformat" value="outfile.txt"/>
      <output name="mandatory_noformat_adv" ftype="txt" value="outfile.txt"/>
      <output name="mandatory_oneformat_adv" ftype="tsv" value="outfile.txt"/>
      <output name="mandatory_multformat_adv" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_noformat" ftype="txt" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_oneformat" ftype="tsv" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_multformat" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_noformat_adv" ftype="txt" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_oneformat_adv" ftype="tsv" value="outfile.txt"/>
      <output name="test_section_sect_mandatory_multformat_adv" value="outfile.txt"/>
    </test>
  </tests>
  <help><![CDATA[Output File parameter tests-corresponding-input.


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