view ProteinResolver.xml @ 13:851f7c252d66 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author galaxyp
date Thu, 01 Dec 2022 18:57:06 +0000
parents 95f90fab5ce8
children c2612cb89529
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: [Quantitation]-->
<tool id="ProteinResolver" name="ProteinResolver" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>protein inference</description>
  <macros>
    <token name="@EXECUTABLE@">ProteinResolver</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 fasta &&
ln -s '$fasta' 'fasta/${re.sub("[^\w\-_]", "_", $fasta.element_identifier)}.$gxy2omsext($fasta.ext)' &&
#if $in_cond.in:
  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
#end if
#if $design:
  mkdir design &&
  ln -s '$design' 'design/${re.sub("[^\w\-_]", "_", $design.element_identifier)}.$gxy2omsext($design.ext)' &&
#end if
#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir protein_groups &&
#end if
#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir peptide_table &&
#end if
#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir protein_table &&
#end if
#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir additional_info &&
#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
-fasta
'fasta/${re.sub("[^\w\-_]", "_", $fasta.element_identifier)}.$gxy2omsext($fasta.ext)'
#if $in_cond.in:
  -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
#end if
#if $design:
  -design
  'design/${re.sub("[^\w\-_]", "_", $design.element_identifier)}.$gxy2omsext($design.ext)'
#end if
#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -protein_groups
  'protein_groups/output.${gxy2omsext("csv")}'
#end if
#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -peptide_table
  'peptide_table/output.${gxy2omsext("csv")}'
#end if
#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -protein_table
  'protein_table/output.${gxy2omsext("csv")}'
#end if
#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -additional_info
  'additional_info/output.${gxy2omsext("csv")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
#if "protein_groups_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'protein_groups/output.${gxy2omsext("csv")}' '$protein_groups'
#end if
#if "peptide_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'peptide_table/output.${gxy2omsext("csv")}' '$peptide_table'
#end if
#if "protein_table_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'protein_table/output.${gxy2omsext("csv")}' '$protein_table'
#end if
#if "additional_info_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'additional_info/output.${gxy2omsext("csv")}' '$additional_info'
#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="-fasta" type="data" format="fasta" optional="false" label="Input database file" help=" select fasta data sets(s)"/>
    <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="consensusxml,idxml" multiple="true" optional="true" label="Input file(s) holding experimental data" help=" select consensusxml,idxml data sets(s)"/>
      </when>
      <when value="yes">
        <param argument="-in" type="data" format="consensusxml,idxml" multiple="false" optional="true" label="Input file(s) holding experimental data" help=" select consensusxml,idxml data sets(s)"/>
      </when>
    </conditional>
    <param argument="-in_path" type="text" optional="true" value="" label="Path to idXMLs or consensusXMLs files" help="Ignored if 'in' is given">
      <expand macro="list_string_san" name="in_path"/>
    </param>
    <param argument="-design" type="data" format="txt" optional="true" label="Text file containing the experimental design" help="See documentation for specific format requirements select txt data sets(s)"/>
    <section name="resolver" title="Additional options for algorithm" help="" expanded="false">
      <param name="missed_cleavages" argument="-resolver:missed_cleavages" type="integer" optional="true" min="0" value="2" label="Number of allowed missed cleavages" help=""/>
      <param name="min_length" argument="-resolver:min_length" type="integer" optional="true" min="1" value="6" label="Minimum length of peptide" help=""/>
      <param name="enzyme" argument="-resolver:enzyme" type="select" optional="true" label="Digestion enzyme" help="">
        <option value="Trypsin" selected="true">Trypsin</option>
        <expand macro="list_string_san" name="enzyme"/>
      </param>
    </section>
    <section name="designer" title="Additional options for quantitative experimental design" help="" expanded="false">
      <param name="experiment" argument="-designer:experiment" type="text" optional="true" value="ExperimentalSetting" label="Identifier for the experimental design" help="">
        <expand macro="list_string_san" name="experiment"/>
      </param>
      <param name="file" argument="-designer:file" type="text" optional="true" value="File" label="Identifier for the file name" help="">
        <expand macro="list_string_san" name="file"/>
      </param>
      <param name="separator" argument="-designer:separator" type="select" optional="true" label="Separator, which should be used to split a row into columns" help="">
        <option value="tab" selected="true">tab</option>
        <option value="semi-colon">semi-colon</option>
        <option value="comma">comma</option>
        <option value="whitespace">whitespace</option>
        <expand macro="list_string_san" name="separator"/>
      </param>
    </section>
    <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="protein_groups_FLAG">protein_groups (output file. Contains all protein groups)</option>
      <option value="peptide_table_FLAG">peptide_table (output file)</option>
      <option value="protein_table_FLAG">protein_table (output file. Contains one protein per line)</option>
      <option value="additional_info_FLAG">additional_info (output file for additional info)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="protein_groups" label="${tool.name} on ${on_string}: protein_groups" format="csv">
      <filter>OPTIONAL_OUTPUTS is not None and "protein_groups_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="peptide_table" label="${tool.name} on ${on_string}: peptide_table" format="csv">
      <filter>OPTIONAL_OUTPUTS is not None and "peptide_table_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="protein_table" label="${tool.name} on ${on_string}: protein_table" format="csv">
      <filter>OPTIONAL_OUTPUTS is not None and "protein_table_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="additional_info" label="${tool.name} on ${on_string}: additional_info" format="csv">
      <filter>OPTIONAL_OUTPUTS is not None and "additional_info_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_ProteinResolver_1 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="fasta" value="ProteinResolver_1_input.fasta"/>
      <conditional name="in_cond">
        <param name="in" value="ProteinResolver_1_input.consensusXML"/>
      </conditional>
      <param name="in_path" value=""/>
      <output name="protein_groups" file="ProteinResolver_1_output1.txt" compare="sim_size" delta_frac="0.7" ftype="csv"/>
      <output name="peptide_table" file="ProteinResolver_1_output2.txt" compare="sim_size" delta_frac="0.7" ftype="csv"/>
      <output name="protein_table" file="ProteinResolver_1_output3.txt" compare="sim_size" delta_frac="0.7" ftype="csv"/>
      <section name="resolver">
        <param name="missed_cleavages" value="2"/>
        <param name="min_length" value="6"/>
        <param name="enzyme" value="Trypsin"/>
      </section>
      <section name="designer">
        <param name="experiment" value="ExperimentalSetting"/>
        <param name="file" value="File"/>
        <param name="separator" value="tab"/>
      </section>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,protein_groups_FLAG,peptide_table_FLAG,protein_table_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help><![CDATA[protein inference


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