view XFDR.xml @ 9:cf9b51c0b15e draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 5c080b1e2b99f1c88f4557e9fec8c45c9d23b906
author galaxyp
date Fri, 14 Jun 2024 21:30:46 +0000
parents 87dda030bc92
children
line wrap: on
line source

<!--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: [Cross-Linking]-->
<tool id="XFDR" name="XFDR" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
  <description>Calculates false discovery rate estimates on crosslink identifications</description>
  <macros>
    <token name="@EXECUTABLE@">XFDR</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 &&
  cp '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
#end if
#if "out_idXML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_idXML &&
#end if
#if "out_mzIdentML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_mzIdentML &&
#end if
#if "out_xquest_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  mkdir out_xquest &&
#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_idXML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_idXML
  'out_idXML/output.${gxy2omsext("idxml")}'
#end if
#if "out_mzIdentML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_mzIdentML
  'out_mzIdentML/output.${gxy2omsext("mzid")}'
#end if
#if "out_xquest_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  -out_xquest
  'out_xquest/output.${gxy2omsext("xquest.xml")}'
#end if
#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
  | tee '$stdout'
#end if

## Postprocessing
#if "out_idXML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_idXML/output.${gxy2omsext("idxml")}' '$out_idXML'
#end if
#if "out_mzIdentML_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_mzIdentML/output.${gxy2omsext("mzid")}' '$out_mzIdentML'
#end if
#if "out_xquest_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
  && mv 'out_xquest/output.${gxy2omsext("xquest.xml")}' '$out_xquest'
#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="idxml,mzid,xquest.xml" optional="true" label="Crosslink Identifications in either xquest.xml, idXML, or mzIdentML format (as produced by OpenPepXL)" help=" select idxml,mzid,xquest.xml data sets(s)"/>
    <param argument="-decoy_string" type="text" value="DECOY_" label="Prefix of decoy protein ids" help="The correspondig target protein id should be retrievable by deleting this prefix">
      <expand macro="list_string_san" name="decoy_string"/>
    </param>
    <param argument="-minborder" type="float" value="-50.0" label="Filter for minimum precursor mass error (ppm) before FDR estimation" help="Values outside of the tolerance window of the original search will effectively disable this filter"/>
    <param argument="-maxborder" type="float" value="50.0" label="Filter for maximum precursor mass error (ppm) before FDR estimation" help="Values outside of the tolerance window of the original search will effectively disable this filter"/>
    <param argument="-mindeltas" type="float" min="0.0" max="1.0" value="0.0" label="Filter for delta score, 0 disables the filte" help="Minimum delta score required, hits are rejected if larger or equal. The delta score is a ratio of the score of a hit and the score of the next best hit to the same spectrum, so the value range is between 0 and 1 with 1.0 meaning the scores are equal and 0.5 meaning the next best score is half as high as the current one"/>
    <param argument="-minionsmatched" type="integer" min="0" value="0" label="Filter for minimum matched ions per peptide" help=""/>
    <param argument="-uniquexl" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Calculate statistics based only on unique IDs" help="For a set of IDs from equal candidates (same pair of peptides, modifications and cross-linked positions), only the highest scoring hit will be considered. By default the score distribution will be estimated using all 1st ranked candidates"/>
    <param argument="-no_qvalues" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Do not transform simple FDR to q-values" help=""/>
    <param argument="-minscore" type="float" value="-10.0" label="Minimum score to be considered for FDR calculation" help="A number lower than the lowest score will effectively disable this filter"/>
    <param argument="-binsize" type="float" min="0.0" value="0.0001" label="Bin size for the cumulative histograms for score distributions" help="Should be about the same size as the smallest expected difference between scores. Smaller numbers will make XFDR more robust, but much slower. Negative numbers are not allowed. Should only be changed if the range of the main score changes or another score than the OpenPepXL score is used"/>
    <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" value="False" label="Enables the test mode (needed for internal use only)" help="" optional="true">
        <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_idXML_FLAG">out_idXML (Output as idXML file)</option>
      <option value="out_mzIdentML_FLAG">out_mzIdentML (Output as mzIdentML file)</option>
      <option value="out_xquest_FLAG">out_xquest (Output as xquest.xml file)</option>
      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
    </param>
  </inputs>
  <outputs>
    <data name="out_idXML" label="${tool.name} on ${on_string}: out_idXML" format="idxml">
      <filter>OPTIONAL_OUTPUTS is not None and "out_idXML_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="out_mzIdentML" label="${tool.name} on ${on_string}: out_mzIdentML" format="mzid">
      <filter>OPTIONAL_OUTPUTS is not None and "out_mzIdentML_FLAG" in OPTIONAL_OUTPUTS</filter>
    </data>
    <data name="out_xquest" label="${tool.name} on ${on_string}: out_xquest" format="xquest.xml">
      <filter>OPTIONAL_OUTPUTS is not None and "out_xquest_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_XFDR_1 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in1.idXML"/>
      <output name="out_idXML" value="XFDR_test_out1_temp.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out1.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out1.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-50.0"/>
      <param name="maxborder" value="50.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="false"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="-10.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_2 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in1.idXML"/>
      <output name="out_idXML" value="XFDR_test_out2.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out2.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out2.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-50.0"/>
      <param name="maxborder" value="50.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="true"/>
      <param name="no_qvalues" value="true"/>
      <param name="minscore" value="-10.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_3 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in2.xquest.xml"/>
      <output name="out_idXML" value="XFDR_test_out3.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out3.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out3.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-50.0"/>
      <param name="maxborder" value="50.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="false"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="0.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_4 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in2.xquest.xml"/>
      <output name="out_idXML" value="XFDR_test_out4.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out4.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out4.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-3.0"/>
      <param name="maxborder" value="3.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="false"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="-10.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_5 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in3.xquest.xml"/>
      <output name="out_idXML" value="XFDR_test_out5.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out5.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out5.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-3.0"/>
      <param name="maxborder" value="3.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="false"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="-10.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_6 -->
    <test expect_num_outputs="2">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in4.idXML"/>
      <output name="out_idXML" value="XFDR_test_out6.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-50.0"/>
      <param name="maxborder" value="50.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="false"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="-10.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
    <!-- TOPP_XFDR_7 -->
    <test expect_num_outputs="4">
      <section name="adv_opts">
        <param name="force" value="false"/>
        <param name="test" value="true"/>
      </section>
      <param name="in" value="XFDR_test_in2.xquest.xml"/>
      <output name="out_idXML" value="XFDR_test_out7.idXML" compare="sim_size" delta_frac="0.7" ftype="idxml"/>
      <output name="out_mzIdentML" value="XFDR_test_out7.mzid" compare="sim_size" delta_frac="0.7" ftype="mzid"/>
      <output name="out_xquest" value="XFDR_test_out7.xquest.xml" compare="sim_size" delta_frac="0.7" ftype="xquest.xml"/>
      <param name="decoy_string" value="DECOY_"/>
      <param name="minborder" value="-50.0"/>
      <param name="maxborder" value="50.0"/>
      <param name="mindeltas" value="0.0"/>
      <param name="minionsmatched" value="0"/>
      <param name="uniquexl" value="true"/>
      <param name="no_qvalues" value="false"/>
      <param name="minscore" value="0.0"/>
      <param name="binsize" value="0.1"/>
      <param name="OPTIONAL_OUTPUTS" value="ctd_out_FLAG,out_idXML_FLAG,out_mzIdentML_FLAG,out_xquest_FLAG"/>
      <output name="ctd_out" ftype="xml">
        <assert_contents>
          <is_valid_xml/>
        </assert_contents>
      </output>
      <assert_stdout>
        <has_text_matching expression="@EXECUTABLE@ took .* \(wall\), .* \(CPU\), .* \(system\), .* \(user\)(; Peak Memory Usage: 32 MB)?."/>
      </assert_stdout>
    </test>
  </tests>
  <help><![CDATA[Calculates false discovery rate estimates on crosslink identifications


For more information, visit https://openms.de/doxygen/release/3.1.0/html/TOPP_XFDR.html]]></help>
  <expand macro="references"/>
</tool>