diff OpenSwathAssayGenerator.xml @ 9:5848492bfc5a draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 12:44:29 +0000
parents 63a26a130c5d
children a41cd777ced9
line wrap: on
line diff
--- a/OpenSwathAssayGenerator.xml	Fri May 17 09:37:46 2019 -0400
+++ b/OpenSwathAssayGenerator.xml	Wed Sep 09 12:44:29 2020 +0000
@@ -1,134 +1,122 @@
 <?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: [Targeted Experiments]-->
-<tool id="OpenSwathAssayGenerator" name="OpenSwathAssayGenerator" version="2.3.0">
+<tool id="OpenSwathAssayGenerator" name="OpenSwathAssayGenerator" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
   <description>Generates assays according to different models for a specific TraML</description>
   <macros>
     <token name="@EXECUTABLE@">OpenSwathAssayGenerator</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[OpenSwathAssayGenerator
+  <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_min_transitions:
-  -min_transitions $param_min_transitions
-#end if
-#if $param_max_transitions:
-  -max_transitions $param_max_transitions
-#end if
-#if $param_allowed_fragment_types:
-  -allowed_fragment_types     "$param_allowed_fragment_types"
-#end if
-#if $param_allowed_fragment_charges:
-  -allowed_fragment_charges     "$param_allowed_fragment_charges"
-#end if
-#if $param_enable_detection_specific_losses:
-  -enable_detection_specific_losses
+## Preprocessing
+mkdir in &&
+ln -s '$in' 'in/${re.sub("[^\w\-_]", "_", $in.element_identifier)}.$gxy2omsext($in.ext)' &&
+mkdir out &&
+#if $swath_windows_file:
+  mkdir swath_windows_file &&
+  ln -s '$swath_windows_file' 'swath_windows_file/${re.sub("[^\w\-_]", "_", $swath_windows_file.element_identifier)}.$gxy2omsext($swath_windows_file.ext)' &&
 #end if
-#if $param_enable_detection_unspecific_losses:
-  -enable_detection_unspecific_losses
-#end if
-#if $param_enable_identification_specific_losses:
-  -enable_identification_specific_losses
-#end if
-#if $param_enable_identification_unspecific_losses:
-  -enable_identification_unspecific_losses
-#end if
-#if $param_enable_identification_ms2_precursors:
-  -enable_identification_ms2_precursors
-#end if
-#if $param_enable_ms1_uis_scoring:
-  -enable_ms1_uis_scoring
+#if $unimod_file:
+  mkdir unimod_file &&
+  ln -s '$unimod_file' 'unimod_file/${re.sub("[^\w\-_]", "_", $unimod_file.element_identifier)}.$gxy2omsext($unimod_file.ext)' &&
 #end if
-#if $param_enable_ms2_uis_scoring:
-  -enable_ms2_uis_scoring
-#end if
-#if $param_max_num_alternative_localizations:
-  -max_num_alternative_localizations $param_max_num_alternative_localizations
+
+## 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 $swath_windows_file:
+  -swath_windows_file
+  'swath_windows_file/${re.sub("[^\w\-_]", "_", $swath_windows_file.element_identifier)}.$gxy2omsext($swath_windows_file.ext)'
 #end if
-#if $param_enable_reannotation:
-  -enable_reannotation
-#end if
-#if $param_precursor_mz_threshold:
-  -precursor_mz_threshold $param_precursor_mz_threshold
-#end if
-#if $param_precursor_lower_mz_limit:
-  -precursor_lower_mz_limit $param_precursor_lower_mz_limit
+#if $unimod_file:
+  -unimod_file
+  'unimod_file/${re.sub("[^\w\-_]", "_", $unimod_file.element_identifier)}.$gxy2omsext($unimod_file.ext)'
 #end if
-#if $param_precursor_upper_mz_limit:
-  -precursor_upper_mz_limit $param_precursor_upper_mz_limit
-#end if
-#if $param_product_mz_threshold:
-  -product_mz_threshold $param_product_mz_threshold
-#end if
-#if $param_product_lower_mz_limit:
-  -product_lower_mz_limit $param_product_lower_mz_limit
-#end if
-#if $param_product_upper_mz_limit:
-  -product_upper_mz_limit $param_product_upper_mz_limit
-#end if
-#if $adv_opts.adv_opts_selector=='advanced':
-    #if $adv_opts.param_swath_windows_file:
-  -swath_windows_file $adv_opts.param_swath_windows_file
-#end if
-    #if $adv_opts.param_force:
-  -force
-#end if
-#end if
-]]></command>
+
+## 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="param_in" type="data" format="traml" optional="False" label="input file ('traML')" help="(-in) "/>
-    <param name="param_min_transitions" type="integer" value="6" label="minimal number of transitions" help="(-min_transitions) "/>
-    <param name="param_max_transitions" type="integer" value="6" label="maximal number of transitions" help="(-max_transitions) "/>
-    <param name="param_allowed_fragment_types" type="text" size="30" value="b,y" label="allowed fragment types" help="(-allowed_fragment_types) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="in" argument="-in" type="data" format="mrm,pqp,tabular,traml" optional="false" label="Input file" help=" select mrm,pqp,tabular,traml data sets(s)"/>
+    <param name="out_type" argument="-out_type" display="radio" type="select" optional="false" label="Output file type -- default: determined from file extension or content" help="">
+      <option value="TraML">traml</option>
+      <option value="pqp">pqp</option>
+      <option value="tsv">tabular (tsv)</option>
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_allowed_fragment_charges" type="text" size="30" value="1,2,3,4" label="allowed fragment charge states" help="(-allowed_fragment_charges) ">
-      <sanitizer>
-        <valid initial="string.printable">
-          <remove value="'"/>
-          <remove value="&quot;"/>
-        </valid>
-      </sanitizer>
+    <param name="min_transitions" argument="-min_transitions" type="integer" optional="true" value="6" label="minimal number of transitions" help=""/>
+    <param name="max_transitions" argument="-max_transitions" type="integer" optional="true" value="6" label="maximal number of transitions" help=""/>
+    <param name="allowed_fragment_types" argument="-allowed_fragment_types" type="text" optional="true" value="b,y" label="allowed fragment types" help="">
+      <expand macro="list_string_san"/>
+    </param>
+    <param name="allowed_fragment_charges" argument="-allowed_fragment_charges" type="text" optional="true" value="1,2,3,4" label="allowed fragment charge states" help="">
+      <expand macro="list_string_san"/>
     </param>
-    <param name="param_enable_detection_specific_losses" display="radio" type="boolean" truevalue="-enable_detection_specific_losses" falsevalue="" checked="false" optional="True" label="set this flag if specific neutral losses for detection fragment ions should be allowed" help="(-enable_detection_specific_losses) "/>
-    <param name="param_enable_detection_unspecific_losses" display="radio" type="boolean" truevalue="-enable_detection_unspecific_losses" falsevalue="" checked="false" optional="True" label="set this flag if unspecific neutral losses (H2O1, H3N1, C1H2N2, C1H2N1O1) for detection fragment ions should be allowed" help="(-enable_detection_unspecific_losses) "/>
-    <param name="param_enable_identification_specific_losses" display="radio" type="boolean" truevalue="-enable_identification_specific_losses" falsevalue="" checked="false" optional="True" label="set this flag if specific neutral losses for identification fragment ions should be allowed" help="(-enable_identification_specific_losses) "/>
-    <param name="param_enable_identification_unspecific_losses" display="radio" type="boolean" truevalue="-enable_identification_unspecific_losses" falsevalue="" checked="false" optional="True" label="set this flag if unspecific neutral losses (H2O1, H3N1, C1H2N2, C1H2N1O1) for identification fragment ions should be allowed" help="(-enable_identification_unspecific_losses) "/>
-    <param name="param_enable_identification_ms2_precursors" display="radio" type="boolean" truevalue="-enable_identification_ms2_precursors" falsevalue="" checked="false" optional="True" label="set this flag if MS2-level precursor ions for identification should be allowed to enable extraction of the precursor signal from the fragment ion data (MS2-level)" help="(-enable_identification_ms2_precursors) This may help in identification if the MS1 signal is weak"/>
-    <param name="param_enable_ms1_uis_scoring" display="radio" type="boolean" truevalue="-enable_ms1_uis_scoring" falsevalue="" checked="false" optional="True" label="set this flag if MS1-UIS assays for UIS scoring should be generated" help="(-enable_ms1_uis_scoring) "/>
-    <param name="param_enable_ms2_uis_scoring" display="radio" type="boolean" truevalue="-enable_ms2_uis_scoring" falsevalue="" checked="false" optional="True" label="set this flag if MS2-UIS assays for UIS scoring should be generated" help="(-enable_ms2_uis_scoring) "/>
-    <param name="param_max_num_alternative_localizations" type="integer" value="20" label="maximum number of site-localization permutations" help="(-max_num_alternative_localizations) "/>
-    <param name="param_enable_reannotation" display="radio" type="boolean" truevalue="-enable_reannotation" falsevalue="" checked="false" optional="True" label="set this flag if reannotation of fragment ions should be allowed" help="(-enable_reannotation) "/>
-    <param name="param_precursor_mz_threshold" type="float" value="0.025" label="MZ threshold in Thomson for precursor ion selection" help="(-precursor_mz_threshold) "/>
-    <param name="param_precursor_lower_mz_limit" type="float" value="400.0" label="lower MZ limit for precursor ions" help="(-precursor_lower_mz_limit) "/>
-    <param name="param_precursor_upper_mz_limit" type="float" value="1200.0" label="upper MZ limit for precursor ions" help="(-precursor_upper_mz_limit) "/>
-    <param name="param_product_mz_threshold" type="float" value="0.025" label="MZ threshold in Thomson for fragment ion annotation" help="(-product_mz_threshold) "/>
-    <param name="param_product_lower_mz_limit" type="float" value="350.0" label="lower MZ limit for fragment ions" help="(-product_lower_mz_limit) "/>
-    <param name="param_product_upper_mz_limit" type="float" value="2000.0" label="upper MZ limit for fragment ions" help="(-product_upper_mz_limit) "/>
-    <expand macro="advanced_options">
-      <param name="param_swath_windows_file" type="data" format="txt" optional="True" label="Tab separated file containing the SWATH windows for exclusion of fragment ions falling into the precursor isolation window: lower_offset upper_offset \newline 400 425 \newline .." help="(-swath_windows_file) Note that the first line is a header and will be skipped"/>
-      <param name="param_force" display="radio" type="boolean" truevalue="-force" falsevalue="" checked="false" optional="True" label="Overwrite tool specific checks" help="(-force) "/>
+    <param name="enable_detection_specific_losses" argument="-enable_detection_specific_losses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="set this flag if specific neutral losses for detection fragment ions should be allowed" help=""/>
+    <param name="enable_detection_unspecific_losses" argument="-enable_detection_unspecific_losses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="set this flag if unspecific neutral losses (H2O1, H3N1, C1H2N2, C1H2N1O1) for detection fragment ions should be allowed" help=""/>
+    <param name="precursor_mz_threshold" argument="-precursor_mz_threshold" type="float" optional="true" value="0.025" label="MZ threshold in Thomson for precursor ion selection" help=""/>
+    <param name="precursor_lower_mz_limit" argument="-precursor_lower_mz_limit" type="float" optional="true" value="400.0" label="lower MZ limit for precursor ions" help=""/>
+    <param name="precursor_upper_mz_limit" argument="-precursor_upper_mz_limit" type="float" optional="true" value="1200.0" label="upper MZ limit for precursor ions" help=""/>
+    <param name="product_mz_threshold" argument="-product_mz_threshold" type="float" optional="true" value="0.025" label="MZ threshold in Thomson for fragment ion annotation" help=""/>
+    <param name="product_lower_mz_limit" argument="-product_lower_mz_limit" type="float" optional="true" value="350.0" label="lower MZ limit for fragment ions" help=""/>
+    <param name="product_upper_mz_limit" argument="-product_upper_mz_limit" type="float" optional="true" value="2000.0" label="upper MZ limit for fragment ions" help=""/>
+    <param name="swath_windows_file" argument="-swath_windows_file" type="data" format="txt" optional="true" label="Tab separated file containing the SWATH windows for exclusion of fragment ions falling into the precursor isolation window: lower_offset upper_offset \newline 400 425 \newline" help="Note that the first line is a header and will be skipped select txt data sets(s)"/>
+    <param name="unimod_file" argument="-unimod_file" type="data" format="xml" optional="true" label="(Modified) Unimod XML file (http://www.unimod.org/xml/unimod.xml) describing residue modifiability" help=" select xml data sets(s)"/>
+    <param name="enable_ipf" argument="-enable_ipf" type="boolean" truevalue="true" falsevalue="false" checked="false" label="IPF: set this flag if identification transitions should be generated for IPF" help="Note: Requires setting 'unimod_file'"/>
+    <expand macro="adv_opts_macro">
+      <param name="max_num_alternative_localizations" argument="-max_num_alternative_localizations" type="integer" optional="true" value="10000" label="IPF: maximum number of site-localization permutations" help=""/>
+      <param name="disable_identification_ms2_precursors" argument="-disable_identification_ms2_precursors" type="boolean" truevalue="true" falsevalue="false" checked="false" label="IPF: set this flag if MS2-level precursor ions for identification should not be allowed for extraction of the precursor signal from the fragment ion data (MS2-level)" help=""/>
+      <param name="disable_identification_specific_losses" argument="-disable_identification_specific_losses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="IPF: set this flag if specific neutral losses for identification fragment ions should not be allowed" help=""/>
+      <param name="enable_identification_unspecific_losses" argument="-enable_identification_unspecific_losses" type="boolean" truevalue="true" falsevalue="false" checked="false" label="IPF: set this flag if unspecific neutral losses (H2O1, H3N1, C1H2N2, C1H2N1O1) for identification fragment ions should be allowed" help=""/>
+      <param name="enable_swath_specifity" argument="-enable_swath_specifity" type="boolean" truevalue="true" falsevalue="false" checked="false" label="IPF: set this flag if identification transitions without precursor specificity" help="(i.e. across whole precursor isolation window instead of precursor MZ) should be generated"/>
+      <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" format="traml"/>
+    <data name="out" label="${tool.name} on ${on_string}: out">
+      <change_format>
+        <when input="out_type" value="TraML" format="traml"/>
+        <when input="out_type" value="pqp" format="pqp"/>
+        <when input="out_type" value="tsv" format="tabular"/>
+      </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>
-  <help>Generates assays according to different models for a specific TraML
+  <tests>
+    <expand macro="autotest_OpenSwathAssayGenerator"/>
+    <expand macro="manutest_OpenSwathAssayGenerator"/>
+  </tests>
+  <help><![CDATA[Generates assays according to different models for a specific TraML
 
 
-For more information, visit https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/2.3.0/html/TOPP_OpenSwathAssayGenerator.html</help>
+For more information, visit http://www.openms.de/documentation/TOPP_OpenSwathAssayGenerator.html]]></help>
+  <expand macro="references"/>
 </tool>