diff MascotAdapter.xml @ 9:fb751f9c050b draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 20:07:35 +0000
parents fd960d61b64d
children 57fb2083a8cb
line wrap: on
line diff
--- a/MascotAdapter.xml	Fri May 17 09:26:58 2019 -0400
+++ b/MascotAdapter.xml	Wed Sep 09 20:07:35 2020 +0000
@@ -1,161 +1,55 @@
 <?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="MascotAdapter" name="MascotAdapter" version="2.3.0">
+<tool id="MascotAdapter" name="MascotAdapter" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Annotates MS/MS spectra using Mascot.</description>
   <macros>
     <token name="@EXECUTABLE@">MascotAdapter</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[MascotAdapter
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
 
-#if $param_in:
-  -in $param_in
-#end if
-#if $param_out:
-  -out $param_out
-#end if
-#if $param_mascot_in:
-  -mascot_in
-#end if
-#if $param_mascot_out:
-  -mascot_out
-#end if
-#if $param_instrument:
-  -instrument     "$param_instrument"
-#end if
-#if $param_precursor_mass_tolerance:
-  -precursor_mass_tolerance $param_precursor_mass_tolerance
-#end if
-#if $param_peak_mass_tolerance:
-  -peak_mass_tolerance $param_peak_mass_tolerance
-#end if
-#if $param_taxonomy:
-  -taxonomy
-  #if " " in str($param_taxonomy):
-    "$param_taxonomy"
-  #else
-    $param_taxonomy
-  #end if
-#end if
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
 
-#if $rep_param_modifications:
--modifications
-  #for token in $rep_param_modifications:
-    #if " " in str(token):
-      "$token.param_modifications"
-    #else
-      $token.param_modifications
-    #end if
-  #end for
-#end if
-
-#if $rep_param_variable_modifications:
--variable_modifications
-  #for token in $rep_param_variable_modifications:
-    #if " " in str(token):
-      "$token.param_variable_modifications"
-    #else
-      $token.param_variable_modifications
-    #end if
-  #end for
-#end if
+## Main program call
 
-#if $rep_param_charges:
--charges
-  #for token in $rep_param_charges:
-    #if " " in str(token):
-      "$token.param_charges"
-    #else
-      $token.param_charges
-    #end if
-  #end for
-#end if
-#if $param_db:
-  -db     "$param_db"
-#end if
-#if $param_hits:
-  -hits     "$param_hits"
-#end if
-#if $param_cleavage:
-  -cleavage
-  #if " " in str($param_cleavage):
-    "$param_cleavage"
-  #else
-    $param_cleavage
-  #end if
-#end if
-#if $param_missed_cleavages:
-  -missed_cleavages $param_missed_cleavages
-#end if
-#if $param_sig_threshold:
-  -sig_threshold $param_sig_threshold
-#end if
-#if $param_pep_homol:
-  -pep_homol $param_pep_homol
-#end if
-#if $param_pep_ident:
-  -pep_ident $param_pep_ident
-#end if
-#if $param_pep_rank:
-  -pep_rank $param_pep_rank
-#end if
-#if $param_prot_score:
-  -prot_score $param_prot_score
-#end if
-#if $param_pep_score:
-  -pep_score $param_pep_score
-#end if
-#if $param_pep_exp_z:
-  -pep_exp_z $param_pep_exp_z
-#end if
-#if $param_show_unassigned:
-  -show_unassigned $param_show_unassigned
-#end if
-#if $param_first_dim_rt:
-  -first_dim_rt $param_first_dim_rt
-#end if
-#if $param_boundary:
-  -boundary     "$param_boundary"
-#end if
-#if $param_mass_type:
-  -mass_type
-  #if " " in str($param_mass_type):
-    "$param_mass_type"
-  #else
-    $param_mass_type
-  #end if
-#end if
-#if $param_mascot_directory:
-  -mascot_directory     "$param_mascot_directory"
-#end if
-#if $param_temp_data_directory:
-  -temp_data_directory     "$param_temp_data_directory"
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+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")}'
+
+## 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[{"mascot_directory": "TODO", "temp_data_directory": "\$TMP_DIR", "log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
   <inputs>
-    <param name="param_in" type="data" format="txt" label="input file in mzData format" help="(-in) &lt;br&gt;Note: In mode 'mascot_out' a Mascot results file (.mascotXML) is read"/>
-    <param name="param_mascot_in" display="radio" type="boolean" truevalue="-mascot_in" falsevalue="" checked="false" optional="True" label="if this flag is set the MascotAdapter will read in mzData and write Mascot generic format" help="(-mascot_in) "/>
-    <param name="param_mascot_out" display="radio" type="boolean" truevalue="-mascot_out" falsevalue="" checked="false" optional="True" label="if this flag is set the MascotAdapter will read in a Mascot results file (.mascotXML) and write idXML" help="(-mascot_out) "/>
-    <param name="param_instrument" type="text" size="30" value="Default" label="the instrument that was used to measure the spectra" help="(-instrument) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="in" argument="-in" type="data" format="txt" optional="false" label="input file in mzData format" help="Note: In mode 'mascot_out' a Mascot results file (.mascotXML) is read select txt data sets(s)"/>
+    <param name="mascot_in" argument="-mascot_in" type="boolean" truevalue="true" falsevalue="false" checked="false" label="if this flag is set the MascotAdapter will read in mzData and write Mascot generic format" help=""/>
+    <param name="mascot_out" argument="-mascot_out" type="boolean" truevalue="true" falsevalue="false" checked="false" label="if this flag is set the MascotAdapter will read in a Mascot results file (.mascotXML) and write idXML" help=""/>
+    <param name="instrument" argument="-instrument" type="text" optional="true" value="Default" label="the instrument that was used to measure the spectra" help="">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_precursor_mass_tolerance" type="float" value="2.0" label="the precursor mass tolerance" help="(-precursor_mass_tolerance) "/>
-    <param name="param_peak_mass_tolerance" type="float" value="1.0" label="the peak mass tolerance" help="(-peak_mass_tolerance) "/>
-    <param name="param_taxonomy" type="select" optional="False" value="All entries" label="the taxonomy" help="(-taxonomy) ">
+    <param name="precursor_mass_tolerance" argument="-precursor_mass_tolerance" type="float" optional="true" value="2.0" label="the precursor mass tolerance" help=""/>
+    <param name="peak_mass_tolerance" argument="-peak_mass_tolerance" type="float" optional="true" value="1.0" label="the peak mass tolerance" help=""/>
+    <param name="taxonomy" argument="-taxonomy" type="select" optional="false" label="the taxonomy" help="">
       <option value="All entries" selected="true">All entries</option>
       <option value=". . Archaea (Archaeobacteria)">. . Archaea (Archaeobacteria)</option>
       <option value=". . Eukaryota (eucaryotes)">. . Eukaryota (eucaryotes)</option>
@@ -221,54 +115,27 @@
       <option value=". . Other (includes plasmids and artificial sequences)">. . Other (includes plasmids and artificial sequences)</option>
       <option value=". . unclassified">. . unclassified</option>
       <option value=". . Species information unavailable">. . Species information unavailable</option>
+      <expand macro="list_string_san"/>
     </param>
-    <repeat name="rep_param_modifications" min="0" title="param_modifications">
-      <param name="param_modifications" type="text" size="30" label="the modifications i.e. Carboxymethyl (C)" help="(-modifications) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
-      </param>
-    </repeat>
-    <repeat name="rep_param_variable_modifications" min="0" title="param_variable_modifications">
-      <param name="param_variable_modifications" type="text" size="30" label="the variable modifications i.e. Carboxymethyl (C)" help="(-variable_modifications) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
-      </param>
-    </repeat>
-    <repeat name="rep_param_charges" min="0" max="1" title="param_charges">
-      <param name="param_charges" type="text" size="30" value="1+ 2+ 3+" label="the different charge states" help="(-charges) ">
-        <sanitizer>
-          <valid initial="string.printable">
-            <remove value="'"/>
-            <remove value="&quot;"/>
-          </valid>
-        </sanitizer>
-      </param>
-    </repeat>
-    <param name="param_db" type="text" size="30" value="MSDB" label="the database to search in" help="(-db) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="modifications" argument="-modifications" type="text" optional="true" value="" label="the modifications i.e. Carboxymethyl (C)" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
+      <expand macro="list_string_val"/>
+      <expand macro="list_string_san"/>
+    </param>
+    <param name="variable_modifications" argument="-variable_modifications" type="text" optional="true" value="" label="the variable modifications i.e. Carboxymethyl (C)" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
+      <expand macro="list_string_val"/>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_hits" type="text" size="30" value="AUTO" label="the number of hits to report" help="(-hits) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="charges" argument="-charges" type="text" optional="true" value="1+ 2+ 3+" label="the different charge states" help=" (space separated list, in order to allow for spaces in list items surround them by single quotes)">
+      <expand macro="list_string_val"/>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_cleavage" type="select" optional="False" value="Trypsin" label="The enzyme descriptor to the enzyme used for digestion" help="(-cleavage) (Trypsin is default, None would be best for peptide input or unspecific digestion, for more please refer to your mascot server)">
+    <param name="db" argument="-db" type="text" optional="true" value="MSDB" label="the database to search in" help="">
+      <expand macro="list_string_san"/>
+    </param>
+    <param name="hits" argument="-hits" type="text" optional="true" value="AUTO" label="the number of hits to report" help="">
+      <expand macro="list_string_san"/>
+    </param>
+    <param name="cleavage" argument="-cleavage" type="select" optional="false" label="The enzyme descriptor to the enzyme used for digestion" help="(Trypsin is default, None would be best for peptide input or unspecific digestion, for more please refer to your mascot server)">
       <option value="Trypsin" selected="true">Trypsin</option>
       <option value="Arg-C">Arg-C</option>
       <option value="Asp-N">Asp-N</option>
@@ -288,54 +155,49 @@
       <option value="semiTrypsin">semiTrypsin</option>
       <option value="LysC+AspN">LysC+AspN</option>
       <option value="None">None</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_missed_cleavages" type="integer" min="0" optional="True" value="0" label="number of allowed missed cleavages" help="(-missed_cleavages) "/>
-    <param name="param_sig_threshold" type="float" value="0.05" label="significance threshold" help="(-sig_threshold) "/>
-    <param name="param_pep_homol" type="float" value="1.0" label="peptide homology threshold" help="(-pep_homol) "/>
-    <param name="param_pep_ident" type="float" value="1.0" label="peptide ident threshold" help="(-pep_ident) "/>
-    <param name="param_pep_rank" type="integer" value="1" label="peptide rank" help="(-pep_rank) "/>
-    <param name="param_prot_score" type="float" value="1.0" label="protein score" help="(-prot_score) "/>
-    <param name="param_pep_score" type="float" value="1.0" label="peptide score" help="(-pep_score) "/>
-    <param name="param_pep_exp_z" type="integer" value="1" label="peptide expected charge" help="(-pep_exp_z) "/>
-    <param name="param_show_unassigned" type="integer" value="1" label="show_unassigned" help="(-show_unassigned) "/>
-    <param name="param_first_dim_rt" type="float" value="0.0" label="additional information which is added to every peptide identification as metavalue if set &gt; 0" help="(-first_dim_rt) "/>
-    <param name="param_boundary" type="text" size="30" label="MIME boundary for mascot output format" help="(-boundary) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="missed_cleavages" argument="-missed_cleavages" type="integer" optional="true" min="0" value="0" label="number of allowed missed cleavages" help=""/>
+    <param name="sig_threshold" argument="-sig_threshold" type="float" optional="true" value="0.05" label="significance threshold" help=""/>
+    <param name="pep_homol" argument="-pep_homol" type="float" optional="true" value="1.0" label="peptide homology threshold" help=""/>
+    <param name="pep_ident" argument="-pep_ident" type="float" optional="true" value="1.0" label="peptide ident threshold" help=""/>
+    <param name="pep_rank" argument="-pep_rank" type="integer" optional="true" value="1" label="peptide rank" help=""/>
+    <param name="prot_score" argument="-prot_score" type="float" optional="true" value="1.0" label="protein score" help=""/>
+    <param name="pep_score" argument="-pep_score" type="float" optional="true" value="1.0" label="peptide score" help=""/>
+    <param name="pep_exp_z" argument="-pep_exp_z" type="integer" optional="true" value="1" label="peptide expected charge" help=""/>
+    <param name="show_unassigned" argument="-show_unassigned" type="integer" optional="true" value="1" label="show_unassigned" help=""/>
+    <param name="first_dim_rt" argument="-first_dim_rt" type="float" optional="true" value="0.0" label="additional information which is added to every peptide identification as metavalue if set &gt; 0" help=""/>
+    <param name="boundary" argument="-boundary" type="text" optional="true" value="" label="MIME boundary for mascot output format" help="">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_mass_type" display="radio" type="select" optional="False" value="Monoisotopic" label="mass type" help="(-mass_type) ">
+    <param name="mass_type" argument="-mass_type" display="radio" type="select" optional="false" label="mass type" help="">
       <option value="Monoisotopic" selected="true">Monoisotopic</option>
       <option value="Average">Average</option>
-    </param>
-    <param name="param_mascot_directory" type="text" size="30" label="the directory in which mascot is located" help="(-mascot_directory) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_temp_data_directory" type="text" size="30" label="a directory in which some temporary files can be stored" help="(-temp_data_directory) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <expand macro="adv_opts_macro">
+      <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>
-    <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) "/>
-    </expand>
   </inputs>
   <outputs>
-    <data name="param_out" format="data"/>
+    <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>
-  <help>Annotates MS/MS spectra using Mascot.
+  <tests>
+    <expand macro="autotest_MascotAdapter"/>
+    <expand macro="manutest_MascotAdapter"/>
+  </tests>
+  <help><![CDATA[Annotates MS/MS spectra using Mascot.
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_MascotAdapter.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_MascotAdapter.html]]></help>
+  <expand macro="references"/>
 </tool>