view GNPSExport.xml @ 0:c9f7a0928f0a draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit ddf41e8bda1ba065f5cdec98e93dee8165ffc1b9"
author galaxyp
date Thu, 27 Aug 2020 23:16:48 +0000
parents
children 7f8b512ad94a
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: []-->
<tool id="GNPSExport" name="GNPSExport" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
  <description>Tool to export consensus features into MGF format</description>
  <macros>
    <token name="@EXECUTABLE@">GNPSExport</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_cm &&
ln -s '$in_cm' 'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)' &&
mkdir in_mzml &&
${ ' '.join(["ln -s '%s' 'in_mzml/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_mzml if _]) }
mkdir out &&

## 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_cm
'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)'
-in_mzml
${' '.join(["'in_mzml/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_mzml if _])}
-out
'out/output.${gxy2omsext("mgf")}'

## Postprocessing
&& mv 'out/output.${gxy2omsext("mgf")}' '$out'
#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_cm" argument="-in_cm" type="data" format="consensusxml" optional="false" label="input file containing consensus elements with 'peptide' annotations" help=" select consensusxml data sets(s)"/>
    <param name="in_mzml" argument="-in_mzml" type="data" format="mzml" multiple="true" optional="false" label="original mzml files containing ms/ms spectrum information" help=" select mzml data sets(s)"/>
    <param name="output_type" argument="-output_type" display="radio" type="select" optional="false" label="specificity of mgf output information" help="">
      <option value="full_spectra" selected="true">full_spectra</option>
      <option value="merged_spectra">merged_spectra</option>
      <expand macro="list_string_san"/>
    </param>
    <param name="precursor_mz_tolerance" argument="-precursor_mz_tolerance" type="float" optional="true" value="0.0001" label="Tolerance mz window for precursor selection" help=""/>
    <param name="precursor_rt_tolerance" argument="-precursor_rt_tolerance" type="float" optional="true" value="5.0" label="Tolerance rt window for precursor selection" help=""/>
    <section name="merged_spectra" title="Options for exporting mgf file with merged spectra per feature" help="" expanded="false">
      <param name="cos_similarity" argument="-merged_spectra:cos_similarity" type="float" optional="true" value="0.95" label="Cosine similarity threshold for merged_spectra output" help=""/>
    </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="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out" label="${tool.name} on ${on_string}: out" format="mgf"/>
    <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_GNPSExport"/>
    <expand macro="manutest_GNPSExport"/>
  </tests>
  <help><![CDATA[Tool to export consensus features into MGF format

]]></help>
  <expand macro="references"/>
</tool>