diff msconvert_macros.xml @ 1:7016f1f10f42 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit d56659dd48f8c554a832787e71aca6ae65c90848
author galaxyp
date Tue, 14 Mar 2017 16:45:30 -0400
parents baa6c072fccc
children
line wrap: on
line diff
--- a/msconvert_macros.xml	Fri Apr 08 16:08:09 2016 -0400
+++ b/msconvert_macros.xml	Tue Mar 14 16:45:30 2017 -0400
@@ -1,34 +1,39 @@
 <macros>
   <xml name="generic_requirements">
     <requirements>
-      <requirement type="package" version="3.0.9016">proteowizard</requirement>
+      <requirement type="package" version="3.0.9992">proteowizard</requirement>
     </requirements>
   </xml>
-  <token name="@VERSION@">3.0</token>
+  <token name="@VERSION@">3.0.9992</token>
   
   <xml name="msconvertCommand">
     <command interpreter="python">
 <![CDATA[
     #import re
     #set $ext = $input.ext
+
+    ## sanitize display name for use as temp filename
+    #set basename = 'pwiz_in'
+    
+    #if hasattr($input, 'display_name')
+      ## explicit inclusion or exclusion ??
+      #set basename = $re.sub(r'[^\w\.\-\+]','_',$input.display_name)
+      ##set basename = $re.sub(r'[\/\\\;\|\&\>\<]','_',$input.display_name)
+    #end if
+
     msconvert_wrapper.py
+
     #if $ext == 'wiff':
-      #set basename = 'absciex'
-      #if hasattr($input, 'display_name')
-        #set basename = $re.sub('\W','_',$input.display_name)
-      #end if
-      --input=${input.extra_files_path}/wiff
-      --input_name='${basename}.wiff
-      --implicit=${input.extra_files_path}/wiff_scan
-      --input=${input.extra_files_path}/wiff_scan
-      --input_name='${basename}.wiff.scan
+      --input='${input.extra_files_path}/wiff'
+      --input_name='${basename}.wiff'
+      --implicit='${input.extra_files_path}/wiff_scan'
+      --input='${input.extra_files_path}/wiff_scan'
+      --input_name='${basename}.wiff.scan'
     #else
-      --input=${input}
-      #if hasattr($input, 'display_name')
-      --input_name='${input.display_name}'
-      #end if
+      --input='${input}'
+      --input_name='$basename'
     #end if
-    --output=${output}
+    --output='${output}'
     ## BEGIN_VERSION_DEFAULT
     --fromextension=$ext
     ## END_VERSION_DEFAULT
@@ -36,15 +41,10 @@
 
     ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!)
       #if $data_processing.precursor_refinement.use_mzrefinement
-        #set $input_ident_name = $re.sub('\W','_',$data_processing.precursor_refinement.input_ident.display_name)
-        #if $data_processing.precursor_refinement.input_ident.ext == 'mzid':
-          #set $input_ident_name = $re.sub('(?i)([.]?mzid)*$','.mzid',$input_ident_name)
-        #elif $data_processing.precursor_refinement.input_ident.ext == 'pepxml':
-          #set $input_ident_name = $re.sub('(?i)([.]?pep[.]?xml)*$','.pep.xml',$input_ident_name)
-        #end if
-      --ident=$data_processing.precursor_refinement.input_ident
-      --ident_name=$input_ident_name
-      --refinement=$output_refinement
+        #set input_ident_name = ".".join(($basename, $data_processing.precursor_refinement.input_ident.ext))
+      --ident='$data_processing.precursor_refinement.input_ident'
+      --ident_name='$input_ident_name'
+      --refinement='$output_refinement'
       --filter "mzRefiner $input_ident_name
         msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels
         thresholdScore=$data_processing.precursor_refinement.thresholdScore
@@ -54,7 +54,7 @@
       #end if
 
       #if $data_processing.peak_picking.pick_peaks
-      --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"
+        --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"
       #end if
 
       #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor"
@@ -76,27 +76,27 @@
       #end if
 
       #for threshold_entry in $data_processing.thresholds
-      --filter "threshold $threshold_entry.threshold_type $threshold_entry.value $threshold_entry.orientation"
+        --filter "threshold $threshold_entry.threshold_type $threshold_entry.value $threshold_entry.orientation"
       #end for
 
       #if $data_processing.filter_mz_windows.do_mzwindow_filter
-      --filter "mzWindow [$data_processing.filter_mz_windows.mz_window_from,$data_processing.filter_mz_windows.mz_window_to]"
+        --filter "mzWindow [$data_processing.filter_mz_windows.mz_window_from,$data_processing.filter_mz_windows.mz_window_to]"
       #end if
 
       #if $data_processing.etd_filtering.do_etd_filtering
-      --filter "ETDFilter $data_processing.etd_filtering.remove_precursor
-        $data_processing.etd_filtering.remove_charge_reduced
-        $data_processing.etd_filtering.remove_neutral_loss
-        $data_processing.etd_filtering.blanket_removal
-        $data_processing.etd_filtering.matching_tolerance $data_processing.etd_filtering.matching_tolerance_units"
+        --filter "ETDFilter $data_processing.etd_filtering.remove_precursor
+          $data_processing.etd_filtering.remove_charge_reduced
+          $data_processing.etd_filtering.remove_neutral_loss
+          $data_processing.etd_filtering.blanket_removal
+          $data_processing.etd_filtering.matching_tolerance $data_processing.etd_filtering.matching_tolerance_units"
       #end if
 
       #if $data_processing.ms2denoise.denoise
-      --filter "MS2Denoise $data_processing.ms2denoise.num_peaks $data_processing.ms2denoise.window_width $data_processing.ms2denoise.relax"
+        --filter "MS2Denoise $data_processing.ms2denoise.num_peaks $data_processing.ms2denoise.window_width $data_processing.ms2denoise.relax"
       #end if
 
       #if str($data_processing.ms2deisotope) == "true"
-      --filter "MS2Deisotope"
+        --filter "MS2Deisotope"
       #end if
 
 
@@ -106,35 +106,35 @@
       #end if
 
       #if len($filtering.indices) > 0
-      --filter "index
-      #for $index in $filtering.indices
-      [${index.from},${index.to}]
-      #end for
-      "
+        --filter "index
+        #for $index in $filtering.indices
+          [${index.from},${index.to}]
+        #end for
+        "
       #end if
 
       #if len($filtering.scan_numbers) > 0
-      --filter "scanNumber
-      #for $scan_number in $filtering.scan_numbers
-      [${scan_number.from},${scan_number.to}]
-      #end for
-      "
+        --filter "scanNumber
+        #for $scan_number in $filtering.scan_numbers
+          [${scan_number.from},${scan_number.to}]
+        #end for
+        "
       #end if
 
       #if $filtering.strip_it.value
-      --filter "stripIT"
+         --filter "stripIT"
       #end if
 
       #if $filtering.filter_ms_levels.do_ms_level_filter
-      --filter "msLevel [$filtering.filter_ms_levels.ms_level_from, $filtering.filter_ms_levels.ms_level_to]"
+        --filter "msLevel [$filtering.filter_ms_levels.ms_level_from, $filtering.filter_ms_levels.ms_level_to]"
       #end if
 
       #if str($filtering.polarity) != "false"
-      --filter "polarity $filtering.polarity"
+        --filter "polarity $filtering.polarity"
       #end if
 
       #if str($filtering.analyzer) != "false"
-      --filter "analyzer $filtering.analyzer"
+        --filter "analyzer $filtering.analyzer"
       #end if
       
     ## OUTPUT ENCODING
@@ -154,21 +154,21 @@
 
       #set binary_compression = str($settings.binary_compression)
       #if $binary_compression == "zlib"
-      --zlib
+        --zlib
       #else if $binary_compression == "numpressLinearPic"
-      --numpressLinear --numpressPic
+        --numpressLinear --numpressPic
       #else if $binary_compression == "numpressLinearSlof"
-      --numpressLinear --numpressSlof
+        --numpressLinear --numpressSlof
       #else if $binary_compression == "numpressLinear"
-      --numpressLinear
+        --numpressLinear
       #else if $binary_compression == "numpressPic"
-      --numpressPic
+        --numpressPic
       #else if $binary_compression == "numpressSlof"
-      --numpressSlof
+        --numpressSlof
       #end if
 
       #if $settings.gzip_compression
-      --gzip
+        --gzip
       #end if
 
 ]]>
@@ -203,13 +203,23 @@
         </when>
       </conditional>
 
-      <conditional name="precursor_refinement" title="MZRefinery Precursor Refinement" expanded="true">
+      <conditional name="precursor_refinement">
         <param type="boolean" name="use_mzrefinement" label="Apply m/z refinement with identification data?" truevalue="true" falsevalue="false" checked="False" />
         <when value="false"></when>
         <when value="true">
           <param name="input_ident" type="data" format="pepxml,mzid" label="MZRefinery - Input identification data" />
-          <param name="thresholdScore" type="text" value="mvh" label="MZRefinery - Threshold Score Name" help="E.g. 'mvh' for MyriMatch, 'xcorr' for Sequest, 'specevalue' for MS-GF+" />
-          <param name="thresholdValue" type="text" value="50-" label="MZRefinery - Threshold Score Value" help="MZRefinery uses peptide-spectrum-matches with scores from this range to build its model. '100-' means score equal to or greater than 100. '-1e-10' means less than or equal to 1e-10." />
+          <param name="thresholdScore" type="text" value="mvh" label="MZRefinery - Threshold Score Name" help="E.g. 'mvh' for MyriMatch, 'xcorr' for Sequest, 'specevalue' for MS-GF+">
+            <sanitizer>
+              <valid initial="string.letters" />
+            </sanitizer>
+          </param>
+          <param name="thresholdValue" type="text" value="50-" label="MZRefinery - Threshold Score Value" help="MZRefinery uses peptide-spectrum-matches with scores from this range to build its model. '100-' means score equal to or greater than 100. '-1e-10' means less than or equal to 1e-10.">
+            <sanitizer>
+              <valid initial="string.letters,string.digits">
+                <add value="-" />
+              </valid>
+            </sanitizer>
+          </param>
           <param name="thresholdStep" type="float" value="0" label="MZRefinery - Threshold Score Step" help="If there are not enough quality hits at the given score threshold value, the threshold can be increased by this step (until maxSteps is reached)." />
           <param name="thresholdMaxSteps" type="integer" value="0" label="MZRefinery - At most, how many steps to widen the threshold?" />
           <param name="precursor_refinement_ms_levels" type="select" label="MZRefinery - Apply to MS Levels">
@@ -322,14 +332,14 @@
         <option value="CID">CID</option>
         <option value="SA">SA</option>
         <option value="HCD">HCD</option>
-        <option>BIRD</option>
-        <option>ECD</option>
-        <option>IRMPD</option>
-        <option>PD</option>
-        <option>PSD</option>
-        <option>PQD</option>
-        <option>SID</option>
-        <option>SORI</option>
+        <option value="BIRD">BIRD</option>
+        <option value="ECD">ECD</option>
+        <option value="IRMPD">IRMPD</option>
+        <option value="PD">PD</option>
+        <option value="PSD">PSD</option>
+        <option value="PQD">PQD</option>
+        <option value="SID">SID</option>
+        <option value="SORI">SORI</option>
       </param>
 
       <repeat name="indices" title="Filter Scan Indices">
@@ -433,7 +443,7 @@
       <param name="output_type" value="mz5" />
       <param name="mz_encoding" value="64" />
       <param name="intensity_encoding" value="64" />
-      <output name="output" file="small-zlib-64.mz5" compare="sim_size" delta="100" />
+      <output name="output" file="small-zlib-64.mz5" compare="sim_size" delta="150000" />
     </test>
     <test>
       <param name="input" value="small-peakpicking-cwt-allMS.mzML" />
@@ -502,11 +512,11 @@
       <param name="output_type" value="mzML" />
       <param name="binary_compression" value="numpressLinearPic" />
       <param name="use_mzrefinement" value="true" />
-      <param name="input_ident" value="Rpal_01.pepXML.gz" />
+      <param name="input_ident" value="Rpal_01.pepXML" />
       <param name="thresholdScore" value="mvh" />
       <param name="thresholdValue" value="40-" />
       <output name="output" file="Rpal_01-mzRefinement.mzML" compare="sim_size" delta="0" />
-      <output name="output.refinement" file="Rpal_01.pepXML.mzRefinement.tsv" />
+      <output name="output_refinement" file="Rpal_01.pepXML.mzRefinement.tsv" />
     </test>
     
     <test>