view FileMerger.xml @ 12:04e7a86378d5 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
author galaxyp
date Thu, 24 Sep 2020 12:11:25 +0000
parents 1dfc532aadd1
children 8b871a67ba56
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: [File Handling]-->
<tool id="FileMerger" name="FileMerger" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
  <description>Merges several MS files into one file.</description>
  <macros>
    <token name="@EXECUTABLE@">FileMerger</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 out &&
#if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir rt_concat_trafo_out &&
#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 _])}
-out
'out/output.${out_type}'
#if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -rt_concat:trafo_out
  ${' '.join(["'rt_concat_trafo_out/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext("trafoxml")) for _ in $in if _])}
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
&& mv 'out/output.${out_type}' '$out'
#if "trafo_out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  ${' '.join(["&& mv -n 'in/%(id)s.%(gext)s' 'rt_concat_trafo_out/%(id)s'"%{"id": re.sub('[^\w\-_]', '_', _.element_identifier), "gext": $gxy2omsext("trafoxml")} for _ in $rt_concat_trafo_out if _])}
#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="consensusxml,dta,dta2d,fasta,featurexml,mgf,mzdata,mzml,mzxml,traml" multiple="true" optional="false" label="Input files separated by blank" help=" select consensusxml,dta,dta2d,fasta,featurexml,mgf,mzdata,mzml,mzxml,traml data sets(s)"/>
    <param name="out_type" type="select" optional="false" label="File type of output out (Output file)">
      <option value="mzML">mzml</option>
      <option value="featureXML">featurexml</option>
      <option value="consensusXML">consensusxml</option>
      <option value="traML">traml</option>
      <option value="fasta">fasta</option>
    </param>
    <param name="annotate_file_origin" argument="-annotate_file_origin" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Store the original filename in each feature using meta value &quot;file_origin&quot; (for featureXML and consensusXML only)" help=""/>
    <param name="append_method" argument="-append_method" display="radio" type="select" optional="false" label="Append consensusMaps rowise or colwise" help="(Please use colwise for the MSstatsConverter)">
      <option value="append_rows" selected="true">append_rows</option>
      <option value="append_cols">append_cols</option>
      <expand macro="list_string_san"/>
    </param>
    <section name="rt_concat" title="Options for concatenating files in the retention time (RT) dimension" help="The RT ranges of inputs are adjusted so they don't overlap in the merged file (traML input not supported)" expanded="false">
      <param name="gap" argument="-rt_concat:gap" type="float" optional="true" value="0.0" label="The amount of gap (in seconds) to insert between the RT ranges of different input files" help="RT concatenation is enabled if a value &gt; 0 is set"/>
    </section>
    <section name="raw" title="Options for raw data input/output (primarily for DTA files)" help="" expanded="false">
      <param name="rt_auto" argument="-raw:rt_auto" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Assign retention times automatically (integers starting at 1)" help=""/>
      <param name="rt_custom" argument="-raw:rt_custom" type="text" optional="true" value="" label="List of custom retention times that are assigned to the files" help="The number of given retention times must be equal to the number of input files (space separated list, in order to allow for spaces in list items surround them by single quotes)">
        <expand macro="list_float_valsan"/>
      </param>
      <param name="rt_filename" argument="-raw:rt_filename" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Try to guess the retention time of a file based on the filename" help="This option is useful for merging DTA files, where filenames should contain the string 'rt' directly followed by a floating point number, e.g. 'my_spectrum_rt2795.15.dta'"/>
      <param name="ms_level" argument="-raw:ms_level" type="integer" optional="true" value="0" label="If 1 or higher, this number is assigned to spectra as the MS level" help="This option is useful for DTA files which do not contain MS level information"/>
    </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="trafo_out_FLAG">trafo_out (If 1 or higher, this number is assigned to spectra as the MS level)</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">
      <change_format>
        <when input="out_type" value="consensusXML" format="consensusxml"/>
        <when input="out_type" value="fasta" format="fasta"/>
        <when input="out_type" value="featureXML" format="featurexml"/>
        <when input="out_type" value="mzML" format="mzml"/>
        <when input="out_type" value="traML" format="traml"/>
      </change_format>
    </data>
    <collection type="list" name="rt_concat_trafo_out" label="${tool.name} on ${on_string}: rt_concat:trafo_out">
      <discover_datasets directory="rt_concat.trafo_out" format="trafoxml" pattern="__name__"/>
      <filter>OPTIONAL_OUTPUTS is not None and "trafo_out_FLAG" in OPTIONAL_OUTPUTS</filter>
    </collection>
    <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_FileMerger"/>
    <expand macro="manutest_FileMerger"/>
  </tests>
  <help><![CDATA[Merges several MS files into one file.


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