view CruxAdapter.xml @ 4:a915cadc2f07 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:08:43 +0000
parents aed7aeb6feec
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: [Identification]-->
<tool id="CruxAdapter" name="CruxAdapter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Identifies MS/MS spectra using Crux.</description>
  <macros>
    <token name="@EXECUTABLE@">CruxAdapter</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 &&
ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
mkdir out &&
mkdir database &&
ln -s '$database' 'database/${re.sub("[^\w\-_]", "_", $database.element_identifier)}.$gxy2omsext($database.ext)' &&

## 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("idxml")}'
-database
'database/${re.sub("[^\w\-_]", "_", $database.element_identifier)}.$gxy2omsext($database.ext)'

## Postprocessing
&& mv 'out/output.${gxy2omsext("idxml")}' '$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[{"crux_executable": "crux", "log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
  </configfiles>
  <inputs>
    <param argument="-in" type="data" format="mzml" optional="false" label="Input file" help=" select mzml data sets(s)"/>
    <param argument="-database" type="data" format="fasta" optional="false" label="FASTA file" help=" select fasta data sets(s)"/>
    <param argument="-extra_index_args" type="text" optional="true" value="" label="Extra arguments to be passed to tide-index" help="">
      <expand macro="list_string_san" name="extra_index_args"/>
    </param>
    <param argument="-extra_search_args" type="text" optional="true" value="" label="Extra arguments to be passed to tide-search" help="">
      <expand macro="list_string_san" name="extra_search_args"/>
    </param>
    <param argument="-extra_percolator_args" type="text" optional="true" value="" label="Extra arguments to be passed to percolato" help="">
      <expand macro="list_string_san" name="extra_percolator_args"/>
    </param>
    <param argument="-precursor_mass_tolerance" type="float" optional="true" value="10.0" label="Precursor monoisotopic mass tolerance (Crux parameter: peptide_mass_tolerance)" help=""/>
    <param argument="-precursor_mass_units" type="select" optional="true" label="Unit of precursor mass tolerance (amu, m/z or ppm)" help="">
      <option value="mass">mass</option>
      <option value="mz">mz</option>
      <option value="ppm" selected="true">ppm</option>
      <expand macro="list_string_san" name="precursor_mass_units"/>
    </param>
    <param argument="-fragment_bin_offset" type="float" optional="true" value="0.0" label="In the discretization of the m/z axes of the observed and theoretical spectra, this parameter specifies the location of the left edge of the first bin, relative to mass = 0" help="(i.e., mz-bin-offset = 0.xx means the left edge of the first bin will be located at +0.xx Da)"/>
    <param argument="-fragment_bin_width" type="float" optional="true" value="0.02" label="Before calculation of the XCorr score, the m/z axes of the observed and theoretical spectra are discretized" help="This parameter specifies the size of each bin. The exact formula for computing the discretized m/z value is floor((x/mz-bin-width) + 1.0 - mz-bin-offset), where x is the observed m/z value. For low resolution ion trap ms/ms data 1.0005079 and for high resolution ms/ms 0.02 is recommended"/>
    <param argument="-isotope_error" type="text" optional="true" value="" label="List of positive, non-zero integers" help="">
      <expand macro="list_string_san" name="isotope_error"/>
    </param>
    <param argument="-run_percolator" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Whether to run percolator after tide-search" help=""/>
    <param argument="-enzyme" type="select" optional="true" label="The enzyme used for peptide digestion" help="">
      <option value="custom-enzyme">custom-enzyme</option>
      <option value="pepsin-a">pepsin-a</option>
      <option value="cyanogen-bromide">cyanogen-bromide</option>
      <option value="clostripain">clostripain</option>
      <option value="elastase-trypsin-chymotrypsin">elastase-trypsin-chymotrypsin</option>
      <option value="no-enzyme">no-enzyme</option>
      <option value="arg-c">arg-c</option>
      <option value="asp-n">asp-n</option>
      <option value="iodosobenzoate">iodosobenzoate</option>
      <option value="staph-protease">staph-protease</option>
      <option value="proline-endopeptidase">proline-endopeptidase</option>
      <option value="glu-c">glu-c</option>
      <option value="elastase">elastase</option>
      <option value="chymotrypsin">chymotrypsin</option>
      <option value="lys-c">lys-c</option>
      <option value="lys-n">lys-n</option>
      <option value="trypsin/p">trypsin/p</option>
      <option value="trypsin" selected="true">trypsin</option>
      <expand macro="list_string_san" name="enzyme"/>
    </param>
    <param argument="-digestion" type="select" optional="true" label="Full, partial or non specific digestion" help="">
      <option value="full-digest" selected="true">full-digest</option>
      <option value="partial-digest">partial-digest</option>
      <option value="non-specific-digest">non-specific-digest</option>
      <expand macro="list_string_san" name="digestion"/>
    </param>
    <param argument="-allowed_missed_cleavages" type="integer" optional="true" value="0" label="Number of possible cleavage sites missed by the enzyme, maximum value is 5; for enzyme search" help=""/>
    <param argument="-decoy_format" type="select" optional="true" label="Decoy generation method either by reversing the sequence or shuffling it" help="">
      <option value="none">none</option>
      <option value="shuffle" selected="true">shuffle</option>
      <option value="peptide-reverse">peptide-reverse</option>
      <option value="protein-reverse">protein-reverse</option>
      <expand macro="list_string_san" name="decoy_format"/>
    </param>
    <param argument="-keep_terminal_aminos" type="select" optional="true" label="Whether to keep N and C terminal in place or also shuffled / reversed" help="">
      <option value="N">N</option>
      <option value="C">C</option>
      <option value="NC" selected="true">NC</option>
      <option value="none">none</option>
      <expand macro="list_string_san" name="keep_terminal_aminos"/>
    </param>
    <param argument="-cterm_modifications" type="text" optional="true" value="" label="Specifies C-terminal static and variable mass modifications on peptides" help="Specify a comma-separated list of C-terminal modification sequences of the form: X+21.9819 Default = &lt;empty&gt;">
      <expand macro="list_string_san" name="cterm_modifications"/>
    </param>
    <param argument="-nterm_modifications" type="text" optional="true" value="" label="Specifies N-terminal static and variable mass modifications on peptides" help="Specify a comma-separated list of N-terminal modification sequences of the form: 1E-18.0106,C-17.0265 Default = &lt;empty&gt;">
      <expand macro="list_string_san" name="nterm_modifications"/>
    </param>
    <param argument="-modifications" type="text" optional="true" value="" label="Expression for static and variable mass modifications to include" help="Specify a comma-separated list of modification sequences of the form: C+57.02146,2M+15.9949,1STY+79.966331,... Default = C+57.02146">
      <expand macro="list_string_san" name="modifications"/>
    </param>
    <param argument="-test_fdr" type="float" optional="true" value="0.01" label="False discovery rate threshold used in selecting hyperparameters during internal cross-validation and for reporting the final results" help=""/>
    <param argument="-train_fdr" type="float" optional="true" value="0.01" label="False discovery rate threshold to define positive examples in training" help=""/>
    <expand macro="adv_opts_macro">
      <param argument="-custom_enzyme" type="text" optional="true" value="" label="Specify rules for in silico digestion of protein sequences" help="Overrides the enzyme option. Two lists of residues are given enclosed in square brackets or curly braces and separated by a |. The first list contains residues required/prohibited before the cleavage site and the second list is residues after the cleavage site.  ">
        <expand macro="list_string_san" name="custom_enzyme"/>
      </param>
      <param argument="-decoy_prefix" type="text" optional="true" value="decoy_" label="Specifies the prefix of the protein names that indicate a decoy" help="">
        <expand macro="list_string_san" name="decoy_prefix"/>
      </param>
      <param argument="-deisotope" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Deisotope spectra before searching" help=""/>
      <param argument="-report_decoys" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Include decoys in the final reported dataset" help=""/>
      <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="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"/>
    <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_CruxAdapter_1 -->
    <test expect_num_outputs="2">
      <section name="adv_opts">
        <param name="custom_enzyme" value=""/>
        <param name="decoy_prefix" value="decoy_"/>
        <param name="deisotope" value="false"/>
        <param name="report_decoys" value="false"/>
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="spectra_comet.mzML"/>
      <output name="out" file="CruxAdapter_1_out.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <param name="database" value="proteins.fasta"/>
      <param name="extra_index_args" value=""/>
      <param name="extra_search_args" value=""/>
      <param name="extra_percolator_args" value=""/>
      <param name="precursor_mass_tolerance" value="10.0"/>
      <param name="precursor_mass_units" value="ppm"/>
      <param name="fragment_bin_offset" value="0.0"/>
      <param name="fragment_bin_width" value="0.02"/>
      <param name="isotope_error" value=""/>
      <param name="run_percolator" value="false"/>
      <param name="enzyme" value="trypsin"/>
      <param name="digestion" value="full-digest"/>
      <param name="allowed_missed_cleavages" value="0"/>
      <param name="decoy_format" value="peptide-reverse"/>
      <param name="keep_terminal_aminos" value="NC"/>
      <param name="cterm_modifications" value=""/>
      <param name="nterm_modifications" value=""/>
      <param name="modifications" value=""/>
      <param name="test_fdr" value="0.01"/>
      <param name="train_fdr" value="0.01"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[Identifies MS/MS spectra using Crux.


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