view AccurateMassSearch.xml @ 16:efb60f2b1582 draft default tip

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 2adf8edc3de4e1cd3b299b26abb14544d17d0636"
author galaxyp
date Fri, 06 Nov 2020 18:11:53 +0000
parents 06df83a2ada5
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: [Utilities]-->
<tool id="AccurateMassSearch" name="AccurateMassSearch" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
  <description>Match MS signals to molecules from a database by mass.</description>
  <macros>
    <token name="@EXECUTABLE@">AccurateMassSearch</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 &&
ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
mkdir out &&
#if "out_annotation_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_annotation &&
#end if
#if $positive_adducts:
  mkdir positive_adducts &&
  ln -s '$positive_adducts' 'positive_adducts/${re.sub("[^\w\-_]", "_", $positive_adducts.element_identifier)}.$gxy2omsext($positive_adducts.ext)' &&
#end if
#if $negative_adducts:
  mkdir negative_adducts &&
  ln -s '$negative_adducts' 'negative_adducts/${re.sub("[^\w\-_]", "_", $negative_adducts.element_identifier)}.$gxy2omsext($negative_adducts.ext)' &&
#end if
#if $db.mapping:
  mkdir db.mapping &&
  ${ ' '.join(["ln -s '%s' 'db.mapping/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $db.mapping if _]) }
#end if
#if $db.struct:
  mkdir db.struct &&
  ${ ' '.join(["ln -s '%s' 'db.struct/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $db.struct if _]) }
#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
'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
-out
'out/output.${gxy2omsext("mztab")}'
#if "out_annotation_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_annotation
  'out_annotation/output.${in.ext}'
#end if
#if $positive_adducts:
  -positive_adducts
  'positive_adducts/${re.sub("[^\w\-_]", "_", $positive_adducts.element_identifier)}.$gxy2omsext($positive_adducts.ext)'
#end if
#if $negative_adducts:
  -negative_adducts
  'negative_adducts/${re.sub("[^\w\-_]", "_", $negative_adducts.element_identifier)}.$gxy2omsext($negative_adducts.ext)'
#end if
#if $db.mapping:
  -db:mapping
  ${' '.join(["'db.mapping/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $db.mapping if _])}
#end if
#if $db.struct:
  -db:struct
  ${' '.join(["'db.struct/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $db.struct if _])}
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
&& mv 'out/output.${gxy2omsext("mztab")}' '$out'
#if "out_annotation_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_annotation/output.${in.ext}' '$out_annotation'
#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,featurexml" optional="false" label="featureXML or consensusXML file" help=" select consensusxml,featurexml data sets(s)"/>
    <param name="positive_adducts" argument="-positive_adducts" type="data" format="tabular" optional="true" label="This file contains the list of potential positive adducts that will be looked for in the database" help="Edit the list if you wish to exclude/include adducts. By default CHEMISTRY/PositiveAdducts.tsv in OpenMS/share is used select tabular data sets(s)"/>
    <param name="negative_adducts" argument="-negative_adducts" type="data" format="tabular" optional="true" label="This file contains the list of potential negative adducts that will be looked for in the database" help="Edit the list if you wish to exclude/include adducts. By default CHEMISTRY/NegativeAdducts.tsv in OpenMS/share is used select tabular data sets(s)"/>
    <section name="db" title="Database files which contain the identifications" help="" expanded="false">
      <param name="mapping" argument="-db:mapping" type="data" format="tabular" multiple="true" optional="true" label="Database input file(s), containing three tab-separated columns of mass, formula, identifie" help="If 'mass' is 0, it is re-computed from the molecular sum formula. By default CHEMISTRY/HMDBMappingFile.tsv in OpenMS/share is used! If empty, the default will be used select tabular data sets(s)"/>
      <param name="struct" argument="-db:struct" type="data" format="tabular" multiple="true" optional="true" label="Database input file(s), containing four tab-separated columns of identifier, name, SMILES, INCHI.The identifier should match with mapping file" help="SMILES and INCHI are reported in the output, but not used otherwise. By default CHEMISTRY/HMDB2StructMapping.tsv in OpenMS/share is used! If empty, the default will be used select tabular data sets(s)"/>
    </section>
    <section name="algorithm" title="Algorithm parameters section" help="" expanded="false">
      <param name="mass_error_value" argument="-algorithm:mass_error_value" type="float" optional="true" value="5.0" label="Tolerance allowed for accurate mass search" help=""/>
      <param name="mass_error_unit" argument="-algorithm:mass_error_unit" display="radio" type="select" optional="false" label="Unit of mass error (ppm or Da)" help="">
        <option value="ppm" selected="true">ppm</option>
        <option value="Da">Da</option>
        <expand macro="list_string_san"/>
      </param>
      <param name="ionization_mode" argument="-algorithm:ionization_mode" display="radio" type="select" optional="false" label="Positive or negative ionization mode" help="If 'auto' is used, the first feature of the input map must contain the meta-value 'scan_polarity'. If its missing, the tool will exit with error">
        <option value="positive" selected="true">positive</option>
        <option value="negative">negative</option>
        <option value="auto">auto</option>
        <expand macro="list_string_san"/>
      </param>
      <param name="isotopic_similarity" argument="-algorithm:isotopic_similarity" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Computes a similarity score for each hit (only if the feature exhibits at least two isotopic mass traces)" help=""/>
      <param name="use_feature_adducts" argument="-algorithm:use_feature_adducts" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Whether to filter AMS candidates mismatching available feature adduct annotation" help=""/>
      <param name="keep_unidentified_masses" argument="-algorithm:keep_unidentified_masses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Keep features that did not yield any DB hit" help=""/>
      <section name="mzTab" title="" help="" expanded="false">
        <param name="exportIsotopeIntensities" argument="-algorithm:mzTab:exportIsotopeIntensities" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[featureXML input only] Export column with available isotope trace intensities (opt_global_MTint)" help=""/>
      </section>
    </section>
    <expand macro="adv_opts_macro">
      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overrides 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" optional="true" multiple="true" label="Optional outputs">
      <option value="out_annotation_FLAG">out_annotation (A copy of the input file, annotated with matching hits from the database)</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="mztab"/>
    <data name="out_annotation" label="${tool.name} on ${on_string}: out_annotation" format_source="in" metadata_source="in">
      <filter>OPTIONAL_OUTPUTS is not None and "out_annotation_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>
    <expand macro="autotest_AccurateMassSearch"/>
    <expand macro="manutest_AccurateMassSearch"/>
  </tests>
  <help><![CDATA[Match MS signals to molecules from a database by mass.


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