view IDFileConverter.xml @ 14:941b8bb0754e draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 2adf8edc3de4e1cd3b299b26abb14544d17d0636"
author galaxyp
date Fri, 06 Nov 2020 20:41:08 +0000
parents 250d6a43f66b
children 7d0eb300f360
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="IDFileConverter" name="IDFileConverter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
  <description>Converts identification engine file formats.</description>
  <macros>
    <token name="@EXECUTABLE@">IDFileConverter</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 $mz_file:
  mkdir mz_file &&
  ln -s '$mz_file' 'mz_file/${re.sub("[^\w\-_]", "_", $mz_file.element_identifier)}.$gxy2omsext($mz_file.ext)' &&
#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.${out_type}'
#if $mz_file:
  -mz_file
  'mz_file/${re.sub("[^\w\-_]", "_", $mz_file.element_identifier)}.$gxy2omsext($mz_file.ext)'
#end if

## Postprocessing
&& mv 'out/output.${out_type}' '$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" argument="-in" type="data" format="idxml,mascotxml,mzid,pepxml,protxml,psms,tabular,xml,xquest.xml" optional="false" label="Input file or directory containing the data to convert" help="This may be:. - a single file in a multi-purpose XML format (.pepXML, .protXML, .idXML, .mzid),. - a single file in a search engine-specific format (Mascot: .mascotXML, OMSSA: .omssaXML, X! Tandem: .xml, Percolator: .psms, xQuest: .xquest.xml),. - a single text file (tab separated) with one line for all peptide sequences matching a spectrum (top N hits),. - for Sequest results, a directory containing .out files..  select idxml,mascotxml,mzid,pepxml,protxml,psms,tabular,xml,xquest.xml data sets(s)"/>
    <param name="out_type" argument="-out_type" type="select" optional="false" label="Output file type (default: determined from file extension)" help="">
      <option value="FASTA">fasta</option>
      <option value="idXML">idxml</option>
      <option value="mzid">mzid</option>
      <option value="pepXML">pepxml</option>
      <option value="xquest.xml">xquest.xml</option>
      <expand macro="list_string_san"/>
    </param>
    <param name="mz_file" argument="-mz_file" type="data" format="mzdata,mzml,mzxml" optional="true" label="[pepXML, Sequest, Mascot, X" help="Tandem, mzid, Percolator only] Retention times and native spectrum ids (spectrum_references) will be looked up in this file select mzdata,mzml,mzxml data sets(s)"/>
    <param name="mz_name" argument="-mz_name" type="text" optional="true" value="" label="[pepXML only] Experiment filename/path (extension will be removed) to match in the pepXML file ('base_name' attribute)" help="Only necessary if different from 'mz_file'">
      <expand macro="list_string_san"/>
    </param>
    <param name="peptideprophet_analyzed" argument="-peptideprophet_analyzed" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[pepXML output only] Write output in the format of a PeptideProphet analysis result" help="By default a 'raw' pepXML is produced that contains only search engine results"/>
    <param name="score_type" argument="-score_type" display="radio" type="select" optional="false" label="[Percolator only] Which of the Percolator scores to report as 'the' score for a peptide hit" help="">
      <option value="qvalue" selected="true">qvalue</option>
      <option value="PEP">PEP</option>
      <option value="score">score</option>
      <expand macro="list_string_san"/>
    </param>
    <expand macro="adv_opts_macro">
      <param name="ignore_proteins_per_peptide" argument="-ignore_proteins_per_peptide" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[Sequest only] Workaround to deal with .out files that contain" help="e.g. &quot;+1&quot; in references column,. but do not list extra references in subsequent lines (try -debug 3 or 4)"/>
      <param name="scan_regex" argument="-scan_regex" type="text" optional="true" value="" label="[Mascot, pepXML, Percolator only] Regular expression used to extract the scan number or retention time" help="See documentation for details">
        <expand macro="list_string_san"/>
      </param>
      <param name="no_spectra_data_override" argument="-no_spectra_data_override" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[+mz_file only] Setting this flag will avoid overriding 'spectra_data' in ProteinIdentifications if mz_file is given and 'spectrum_reference's are added/updated" help="Use only if you are sure it is absolutely the same mz_file as used for identification"/>
      <param name="no_spectra_references_override" argument="-no_spectra_references_override" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[+mz_file only] Setting this flag will avoid overriding 'spectrum_reference' in PeptideIdentifications if mz_file is given and a 'spectrum_reference' is already present" help=""/>
      <param name="add_ionmatch_annotation" argument="-add_ionmatch_annotation" type="float" optional="true" value="0.0" label="[+mz_file only] Will annotate the contained identifications with their matches in the given mz_file" help="Will take quite some while. Match tolerance is .4"/>
      <param name="concatenate_peptides" argument="-concatenate_peptides" type="boolean" truevalue="true" falsevalue="false" checked="false" label="[FASTA output only] Will concatenate the top peptide hits to one peptide sequence, rather than write a new peptide for each hit" help=""/>
      <param name="number_of_hits" argument="-number_of_hits" type="integer" optional="true" value="1" label="[FASTA output only] Controls how many peptide hits will be exported" help="A value of 0 or less exports all hits"/>
      <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="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out" label="${tool.name} on ${on_string}: out">
      <change_format>
        <when input="out_type" value="FASTA" format="fasta"/>
        <when input="out_type" value="idXML" format="idxml"/>
        <when input="out_type" value="mzid" format="mzid"/>
        <when input="out_type" value="pepXML" format="pepxml"/>
        <when input="out_type" value="xquest.xml" format="xquest.xml"/>
      </change_format>
    </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_IDFileConverter"/>
    <expand macro="manutest_IDFileConverter"/>
  </tests>
  <help><![CDATA[Converts identification engine file formats.


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