view RNAMassCalculator.xml @ 4:cb0f5beef55f draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author galaxyp
date Thu, 01 Dec 2022 19:20:12 +0000
parents f8475273db10
children 148c000ea2ec
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="RNAMassCalculator" name="RNAMassCalculator" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Calculates masses, mass-to-charge ratios and sum formulas of RNA sequences</description>
  <macros>
    <token name="@EXECUTABLE@">RNAMassCalculator</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
#if $in:
  mkdir in &&
  ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
#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
#if $in:
  -in
  'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
#end if
#if "out_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out
  'out/output.${gxy2omsext("txt")}'
#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("txt")}' '$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[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
  </configfiles>
  <inputs>
    <param argument="-in" type="data" format="txt" optional="true" label="Input file with RNA sequences and optionally charge numbers (mutually exclusive to 'in_seq')" help=" select txt data sets(s)"/>
    <param argument="-in_seq" type="text" optional="true" value="" label="List of RNA sequences (mutually exclusive to 'in')" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
      <expand macro="list_string_val" name="in_seq"/>
      <expand macro="list_string_san" name="in_seq"/>
    </param>
    <param argument="-charge" type="text" optional="true" value="0" label="List of charge states; required if 'in_seq' is given" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
      <expand macro="list_integer_valsan" name="charge"/>
    </param>
    <param argument="-format" type="select" optional="true" label="Output format ('list': human-readable list, 'table': CSV-like table, 'mass_only': mass values only, 'mz_only': m/z values only, 'formula_only': sum formula only)" help="">
      <option value="list" selected="true">list</option>
      <option value="table">table</option>
      <option value="mass_only">mass_only</option>
      <option value="mz_only">mz_only</option>
      <option value="formula_only">formula_only</option>
      <expand macro="list_string_san" name="format"/>
    </param>
    <param argument="-average_mass" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Compute average (instead of monoisotopic) oligonucleotide masses" help=""/>
    <param argument="-fragment_type" type="select" optional="true" label="For what type of sequence/fragment the mass should be computed" help="">
      <option value="full" selected="true">full</option>
      <option value="internal">internal</option>
      <option value="5-prime">5-prime</option>
      <option value="3-prime">3-prime</option>
      <option value="a-B-ion">a-B-ion</option>
      <option value="a-ion">a-ion</option>
      <option value="b-ion">b-ion</option>
      <option value="c-ion">c-ion</option>
      <option value="d-ion">d-ion</option>
      <option value="w-ion">w-ion</option>
      <option value="x-ion">x-ion</option>
      <option value="y-ion">y-ion</option>
      <option value="z-ion">z-ion</option>
      <expand macro="list_string_san" name="fragment_type"/>
    </param>
    <param argument="-separator" type="text" optional="true" value="" label="Field separator for 'table' output format; by default, the 'tab' character is used" help="">
      <expand macro="list_string_san" name="separator"/>
    </param>
    <expand macro="adv_opts_macro">
      <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; if empty, output is written to the screen)</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="txt">
      <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><!-- UTILS_RNAMassCalculator_1 -->
    <test expect_num_outputs="2">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in_seq" value="&quot;AUCGGC&quot;"/>
      <output name="out" file="RNAMassCalculator_1.txt" compare="sim_size" delta_frac="0.7" ftype="txt"/>
      <param name="charge" value="-1 -2"/>
      <param name="format" value="list"/>
      <param name="average_mass" value="false"/>
      <param name="fragment_type" value="full"/>
      <param name="separator" value=""/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[Calculates masses, mass-to-charge ratios and sum formulas of RNA sequences


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