view MaRaClusterAdapter.xml @ 4:f7195ee7e18d 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:14:16 +0000
parents 2be8c63444db
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: [ID Processing]-->
<tool id="MaRaClusterAdapter" name="MaRaClusterAdapter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Facilitate input to MaRaCluster and reintegrate.</description>
  <macros>
    <token name="@EXECUTABLE@">MaRaClusterAdapter</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 $id_in_cond.id_in:
  mkdir id_in_cond.id_in &&
  #if $id_in_cond.id_in_select == "no"
  mkdir ${' '.join(["'id_in_cond.id_in/%s'" % (i) for i, f in enumerate($id_in_cond.id_in) if f])} && 
  ${' '.join(["ln -s '%s' 'id_in_cond.id_in/%s/%s.%s' && " % (f, i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($id_in_cond.id_in) if f])}
  #else
  ln -s '$id_in_cond.id_in' 'id_in_cond.id_in/${re.sub("[^\w\-_]", "_", $id_in_cond.id_in.element_identifier)}.$gxy2omsext($id_in_cond.id_in.ext)' &&
  #end if
#end if
#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir 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
#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 $id_in_cond.id_in:
  -id_in
  #if $id_in_cond.id_in_select == "no"
  ${' '.join(["'id_in_cond.id_in/%s/%s.%s'"%(i, re.sub('[^\w\-_]', '_', f.element_identifier), $gxy2omsext(f.ext)) for i, f in enumerate($id_in_cond.id_in) if f])}
  #else
  'id_in_cond.id_in/${re.sub("[^\w\-_]", "_", $id_in_cond.id_in.element_identifier)}.$gxy2omsext($id_in_cond.id_in.ext)'
  #end if
#end if
#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out
  'out/output.${gxy2omsext("idxml")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out/output.${gxy2omsext("idxml")}' '$out'
#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[{"maracluster_executable": "/home/berntm/projects/tools-galaxyp/tools/openms/OpenMS2.5.0-git/THIRDPARTY/Linux/64bit/MaRaCluster/maracluster", "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="mgf,mzml" multiple="true" optional="false" label="Input file(s)" help=" select mgf,mzml data sets(s)"/>
      </when>
      <when value="yes">
        <param argument="-in" type="data" format="mgf,mzml" multiple="false" optional="false" label="Input file(s)" help=" select mgf,mzml data sets(s)"/>
      </when>
    </conditional>
    <conditional name="id_in_cond">
      <param name="id_in_select" type="select" label="Run tool in batch mode for -id_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="-id_in" type="data" format="idxml" multiple="true" optional="true" label="Optional idXML Input file(s) in the same order as mzML files - for Maracluster Cluster annotation" help=" select idxml data sets(s)"/>
      </when>
      <when value="yes">
        <param argument="-id_in" type="data" format="idxml" multiple="false" optional="true" label="Optional idXML Input file(s) in the same order as mzML files - for Maracluster Cluster annotation" help=" select idxml data sets(s)"/>
      </when>
    </conditional>
    <param argument="-pcut" type="float" optional="true" max="0.0" value="-10.0" label="log(p-value) cutoff, has to be &lt; 0.0" help="Default: -10.0"/>
    <param argument="-min_cluster_size" type="integer" optional="true" min="1" value="1" label="minimum number of spectra in a cluster for consensus spectra" help=""/>
    <expand macro="adv_opts_macro">
      <param argument="-verbose" type="integer" optional="true" value="2" label="Set verbosity of output: 0=no processing info, 5=all" help=""/>
      <param argument="-precursor_tolerance" type="float" optional="true" value="20.0" label="Precursor monoisotopic mass tolerance" help=""/>
      <param argument="-precursor_tolerance_units" type="select" optional="true" label="tolerance_mass_units 0=ppm, 1=Da" help="">
        <option value="ppm" selected="true">ppm</option>
        <option value="Da">Da</option>
        <expand macro="list_string_san" name="precursor_tolerance_units"/>
      </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_FLAG">out (Output file in idXML format)</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="idxml">
      <filter>OPTIONAL_OUTPUTS is not None and "out_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><!-- TOPP_MaRaClusterAdapter_2 -->
  </tests>
  <help><![CDATA[Facilitate input to MaRaCluster and reintegrate.


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