diff IDMapper.xml @ 11:138a734e21a1 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 19:53:25 +0000
parents d29bb4c9831e
children 2517c03f5cd3
line wrap: on
line diff
--- a/IDMapper.xml	Fri May 17 09:51:41 2019 -0400
+++ b/IDMapper.xml	Wed Sep 09 19:53:25 2020 +0000
@@ -1,100 +1,107 @@
 <?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="IDMapper" name="IDMapper" version="2.3.0">
+<tool id="IDMapper" name="IDMapper" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Assigns protein/peptide identifications to features or consensus features.</description>
   <macros>
     <token name="@EXECUTABLE@">IDMapper</token>
     <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
   </macros>
-  <expand macro="references"/>
+  <expand macro="requirements"/>
   <expand macro="stdio"/>
-  <expand macro="requirements"/>
-  <command detect_errors="aggressive"><![CDATA[IDMapper
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_id:
-  -id $param_id
-#end if
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_rt_tolerance:
-  -rt_tolerance $param_rt_tolerance
-#end if
-#if $param_mz_tolerance:
-  -mz_tolerance $param_mz_tolerance
-#end if
-#if $param_mz_measure:
-  -mz_measure
-  #if " " in str($param_mz_measure):
-    "$param_mz_measure"
-  #else
-    $param_mz_measure
-  #end if
+## Preprocessing
+mkdir id &&
+ln -s '$id' 'id/${re.sub("[^\w\-_]", "_", $id.element_identifier)}.$gxy2omsext($id.ext)' &&
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
+#if $spectra._in:
+  mkdir spectra.in &&
+  ln -s '$spectra._in' 'spectra.in/${re.sub("[^\w\-_]", "_", $spectra._in.element_identifier)}.$gxy2omsext($spectra._in.ext)' &&
 #end if
-#if $param_mz_reference:
-  -mz_reference
-  #if " " in str($param_mz_reference):
-    "$param_mz_reference"
-  #else
-    $param_mz_reference
-  #end if
-#end if
-#if $param_ignore_charge:
-  -ignore_charge
-#end if
-#if $param_feature_use_centroid_rt:
-  -feature:use_centroid_rt
-#end if
-#if $param_feature_use_centroid_mz:
-  -feature:use_centroid_mz
+
+## 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
+-id
+'id/${re.sub("[^\w\-_]", "_", $id.element_identifier)}.$gxy2omsext($id.ext)'
+-in
+'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)'
+-out
+'out/output.${in.ext}'
+#if $spectra._in:
+  -spectra:in
+  'spectra.in/${re.sub("[^\w\-_]", "_", $spectra._in.element_identifier)}.$gxy2omsext($spectra._in.ext)'
 #end if
-#if $param_consensus_use_subelements:
-  -consensus:use_subelements
-#end if
-#if $param_spectra_in:
-  -spectra:in $param_spectra_in
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
-    #if $adv_opts.param_consensus_annotate_ids_with_subelements:
-  -consensus:annotate_ids_with_subelements
-#end if
-#end if
-]]></command>
+
+## Postprocessing
+&& mv 'out/output.${in.ext}' '$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="param_id" type="data" format="mzid,idxml" optional="False" label="Protein/peptide identifications file" help="(-id) "/>
-    <param name="param_in" type="data" format="featurexml,consensusxml,mzq" optional="False" label="Feature map/consensus map file" help="(-in) "/>
-    <param name="param_rt_tolerance" type="float" min="0.0" optional="True" value="5.0" label="RT tolerance (in seconds) for the matching of peptide identifications and (consensus) features" help="(-rt_tolerance) &lt;br&gt;Tolerance is understood as 'plus or minus x', so the matching range increases by twice the given value"/>
-    <param name="param_mz_tolerance" type="float" min="0.0" optional="True" value="20.0" label="m/z tolerance (in ppm or Da) for the matching of peptide identifications and (consensus) features" help="(-mz_tolerance) &lt;br&gt;Tolerance is understood as 'plus or minus x', so the matching range increases by twice the given value"/>
-    <param name="param_mz_measure" display="radio" type="select" optional="False" value="ppm" label="Unit of 'mz_tolerance'" help="(-mz_measure) ">
+    <param name="id" argument="-id" type="data" format="idxml,mzid" optional="false" label="Protein/peptide identifications file" help=" select idxml,mzid data sets(s)"/>
+    <param name="in" argument="-in" type="data" format="consensusxml,featurexml,mzq" optional="false" label="Feature map/consensus map file" help=" select consensusxml,featurexml,mzq data sets(s)"/>
+    <param name="rt_tolerance" argument="-rt_tolerance" type="float" optional="true" min="0.0" value="5.0" label="RT tolerance (in seconds) for the matching of peptide identifications and (consensus) features" help="Tolerance is understood as 'plus or minus x', so the matching range increases by twice the given value"/>
+    <param name="mz_tolerance" argument="-mz_tolerance" type="float" optional="true" min="0.0" value="20.0" label="m/z tolerance (in ppm or Da) for the matching of peptide identifications and (consensus) features" help="Tolerance is understood as 'plus or minus x', so the matching range increases by twice the given value"/>
+    <param name="mz_measure" argument="-mz_measure" display="radio" type="select" optional="false" label="Unit of 'mz_tolerance'" help="">
       <option value="ppm" selected="true">ppm</option>
       <option value="Da">Da</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_mz_reference" display="radio" type="select" optional="False" value="precursor" label="Source of m/z values for peptide identifications" help="(-mz_reference) If 'precursor', the precursor-m/z from the idXML is used. If 'peptide', &lt;br&gt;masses are computed from the sequences of peptide hits; in this case, an identification matches if any of its hits matches. &lt;br&gt;('peptide' should be used together with 'feature:use_centroid_mz' to avoid false-positive matches.)">
-      <option value="precursor" selected="true">precursor</option>
-      <option value="peptide">peptide</option>
+    <param name="mz_reference" argument="-mz_reference" display="radio" type="select" optional="false" label="Source of m/z values for peptide identifications" help="If 'precursor', the precursor-m/z from the idXML is used. If 'peptide',. masses are computed from the sequences of peptide hits; in this case, an identification matches if any of its hits matches.. ('peptide' should be used together with 'feature:use_centroid_mz' to avoid false-positive matches.)">
+      <option value="precursor">precursor</option>
+      <option value="peptide" selected="true">peptide</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_ignore_charge" display="radio" type="boolean" truevalue="-ignore_charge" falsevalue="" checked="false" optional="True" label="For feature/consensus maps: Assign an ID independently of whether its charge state matches that of the (consensus) feature" help="(-ignore_charge) "/>
-    <param name="param_feature_use_centroid_rt" display="radio" type="boolean" truevalue="-feature:use_centroid_rt" falsevalue="" checked="false" optional="True" label="Use the RT coordinates of the feature centroids for matching, instead of the RT ranges of the features/mass traces" help="(-use_centroid_rt) "/>
-    <param name="param_feature_use_centroid_mz" display="radio" type="boolean" truevalue="-feature:use_centroid_mz" falsevalue="" checked="false" optional="True" label="Use the m/z coordinates of the feature centroids for matching, instead of the m/z ranges of the features/mass traces" help="(-use_centroid_mz) &lt;br&gt;(If you choose 'peptide' as 'mz_reference', you should usually set this flag to avoid false-positive matches.)"/>
-    <param name="param_consensus_use_subelements" display="radio" type="boolean" truevalue="-consensus:use_subelements" falsevalue="" checked="false" optional="True" label="Match using RT and m/z of sub-features instead of consensus RT and m/z" help="(-use_subelements) A consensus feature matches if any of its sub-features matches"/>
-    <param name="param_spectra_in" type="data" format="mzml" optional="True" label="MS run used to annotated unidentified spectra to features or consensus features" help="(-in) "/>
-    <expand macro="advanced_options">
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
-      <param name="param_consensus_annotate_ids_with_subelements" display="radio" type="boolean" truevalue="-consensus:annotate_ids_with_subelements" falsevalue="" checked="false" optional="True" label="Store the map index of the sub-feature in the peptide ID" help="(-annotate_ids_with_subelements) "/>
+    <section name="feature" title="Additional options for featureXML input" help="" expanded="false">
+      <param name="use_centroid_rt" argument="-feature:use_centroid_rt" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use the RT coordinates of the feature centroids for matching, instead of the RT ranges of the features/mass traces" help=""/>
+      <param name="use_centroid_mz" argument="-feature:use_centroid_mz" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Use the m/z coordinates of the feature centroids for matching, instead of the m/z ranges of the features/mass traces" help="(If you choose 'peptide' as 'mz_reference', you should usually set this flag to avoid false-positive matches.)"/>
+    </section>
+    <section name="consensus" title="Additional options for consensusXML input" help="" expanded="false">
+      <param name="use_subelements" argument="-consensus:use_subelements" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Match using RT and m/z of sub-features instead of consensus RT and m/z" help="A consensus feature matches if any of its sub-features matches"/>
+      <param name="annotate_ids_with_subelements" argument="-consensus:annotate_ids_with_subelements" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Store the map index of the sub-feature in the peptide ID" help=""/>
+    </section>
+    <section name="spectra" title="Additional options for mzML input" help="" expanded="false">
+      <param name="_in" argument="-spectra:_in" type="data" format="mzml" optional="true" label="MS run used to annotated unidentified spectra to features or consensus features" help=" select mzml data sets(s)"/>
+    </section>
+    <expand macro="adv_opts_macro">
+      <param name="ignore_charge" argument="-ignore_charge" type="boolean" truevalue="true" falsevalue="false" checked="false" label="For feature/consensus maps: Assign an ID independently of whether its charge state matches that of the (consensus) feature" help=""/>
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite 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" multiple="true" label="Optional outputs" optional="true">
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
   </inputs>
   <outputs>
-    <data name="param_out" metadata_source="param_in" format_source="param_in" />
+    <data name="out" label="${tool.name} on ${on_string}: out" format_source="in" metadata_source="in"/>
+    <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>
-  <help>Assigns protein/peptide identifications to features or consensus features.
+  <tests>
+    <expand macro="autotest_IDMapper"/>
+    <expand macro="manutest_IDMapper"/>
+  </tests>
+  <help><![CDATA[Assigns protein/peptide identifications to features or consensus features.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_IDMapper.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_IDMapper.html]]></help>
+  <expand macro="references"/>
 </tool>