diff peak_list_preprocessor.xml @ 2:cf0d72c7b482 draft

Update.
author galaxyp
date Fri, 10 May 2013 17:31:05 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/peak_list_preprocessor.xml	Fri May 10 17:31:05 2013 -0400
@@ -0,0 +1,211 @@
+<tool id="openms_peak_list_preprocessor" version="0.1" name="Peak List Preprocessor">
+  <description>
+    Wizard to apply multiple OpenMS signal preprocessing tools for peak lists.
+  </description>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="stdio" />
+  <expand macro="requires" />
+  <configfiles>
+    <configfile name="setup_input">cp '$input' 'output.mzML'</configfile>
+    <configfile name="rename">mv 'output.mzML' 'input.mzML'</configfile>
+    <configfile name="copy_output">mv 'output.mzML' '$output'</configfile>
+    <configfile name="resampler_config">[simple_options]
+#if $resample.do
+in=input.mzML
+out=output.mzML
+sampling_rate=$resample.sampling_rate
+#end if
+</configfile>
+    <configfile name="noise_filter_config">[simple_options]
+#set $noise_filter_type = str($noise.type)
+in=input.mzML
+out=output.mzML
+#if $noise_filter_type == 'NoiseFilterGaussian'
+
+#end if
+#if $noise_filter_type == 'NoiseFilterSGolay'
+
+#end if
+    </configfile>
+    <configfile name="baseline_config">[simple_options]
+in=input.mzML
+out=output.mzML
+#if $baseline.do
+
+#end if
+    </configfile>
+    <configfile name="peak_picker_config">[simple_options]
+#set $peak_picker_type = str($peak_picker.type)
+in=input.mzML
+out=output.mzML
+#if $peak_picker_type == 'PeakPickerHiRes'
+algorithm!signal_to_noise=$peak_picker.signal_to_noise
+algorithm!ms1_only=$peak_picker.ms1_only
+#end if
+#if $peak_picker_type == 'PeakPickerWavelet'
+algorithm!signal_to_noise=$peak_picker.signal_to_noise
+#if $peak_picker.peak_width.estimate
+algorithm!estimate_peak_width=true
+#else
+algorithm!estimate_peak_width=false
+algorithm!peak_width=$peak_picker.peak_width.peak_width
+#end if
+#end if
+    </configfile>
+    <configfile name="mass_corrector_config">[simple_options]
+in=input.mzML
+out=output.mzML
+    </configfile>
+    <configfile name="spectra_filter_config">[simple_options]
+in=input.mzML
+out=output.mzML
+#set $spectra_filter_type = str($spectra_filter.type)
+    </configfile>
+  </configfiles>
+  <command interpreter="python">
+    openms_wrapper.py 
+    --executable '__SHELL__' --config $setup_input
+    #if $resample.do
+    --executable '__SHELL__' --config $rename
+    --executable 'Resampler' --config $resampler_config
+    #end if
+    #set $noise_filter_type = str($noise.type)
+    #if $noise_filter_type != "none"
+    --executable '__SHELL__' --config $rename
+    --executable '$noise_filter_type' --config $noise_filter_config
+    #end if
+    #if $baseline.do
+    --executable '__SHELL__' --config $rename    
+    --executable 'BaselineFilter' --config $baseline_config
+    #end if
+    #set $peak_picker_type = str($peak_picker.type)
+    #if $peak_picker_type != "none"
+    --executable '__SHELL__' --config $rename
+    --executable '$peak_picker_type' --config $peak_picker_config
+    #if $peak_picker_type == "PeakPickerHiRes"
+    #if $peak_picker.use_high_res_mass_corrector
+    --executable '__SHELL__' --config $rename    
+    --executable 'HighResPrecursorMassCorrector' --config $mass_corrector_config
+    #end if
+    #end if
+    #end if
+    #set $spectra_filter_type = str($spectra_filter.type)
+    #if $spectra_filter_type != "none"
+    --executable '__SHELL__' --config $rename
+    --executable '$spectra_filter_type' --config $spectra_filter_config
+    #end if
+    --executable '__SHELL__' --config $copy_output
+  </command>
+  <inputs>
+    <!-- TODO: Maybe even have a conversion step here. -->
+    <param format="mzML" name="input" type="data" label="Input Peak List (mzML)"/>
+    <conditional name="resample">
+      <param name="do" type="boolean" label="Resample" help="If you want to use the Savitzky Golay filter, or Baseline filter with non equally spaced profile data, e.g. TOF data, you have should generate equally spaced data by resampling.">        
+      </param>
+      <when value="false">
+      </when>
+      <when value="true">
+        <expand macro="sampling_rate_param" />
+      </when>
+    </conditional>
+    <conditional name="noise">
+      <param name="type" type="select" label="Noise Filter" help="">
+        <option value="none" select="true">None</option>
+        <option value="NoiseFilterGaussian">Gaussian</option>
+        <option value="NoiseFilterSGolay">Savitzky Golay</option>
+      </param>
+      <when value="none">
+      </when>
+      <when value="NoiseFilterGaussian">
+      </when>
+      <when value="NoiseFilterSGolay">
+      </when>
+    </conditional>
+    <conditional name="baseline">
+      <param name="do" type="boolean" label="Apply Baseline Filter" help="Executes the top-hat filter to remove the baseline of an MS experiment." />
+      <when value="false">
+      </when>
+      <when value="true">
+      </when>
+    </conditional>
+    <conditional name="peak_picker">
+      <param name="type" type="select" label="Peak Picker" help="">
+        <option value="none" select="true">None</option>
+        <option value="PeakPickerHiRes">High Resolution</option>
+        <option value="PeakPickerWavelet">Wavelet</option>
+      </param>
+      <when value="none">
+      </when>
+      <when value="PeakPickerHiRes">
+        <param name="signal_to_noise" label="Signal-to-noise Ratio" help="Minimal signal to noise ratio for a peak to be picked. (0.0 disables SNT estimation!)" value="1.0" type="float" />
+        <param name="ms1_only" type="boolean" label="MS1 Only" truevalue="true" falsevalue="false" />
+        <param name="use_high_res_mass_corrector" label="Correct precursor m/z on centroided high resolution data." checked="false" type="boolean" />
+      </when>
+      <when value="PeakPickerWavelet">
+        <param name="signal_to_noise" label="Signal-to-noise Ratio" help="Minimal signal to noise ratio for a peak to be picked." value="1.0" type="float" />
+        <conditional name="peak_width">
+          <param name="estimate" label="Estimate Peak Width" type="boolean" checked="false" />
+          <when value="true">
+          </when>
+          <when value="false">
+            <param name="peak_width" type="float" value="0.15" help="Approximate fwhm of the peaks." label="Peak Width" />
+          </when>
+        </conditional>        
+      </when>
+    </conditional>
+    <conditional name="spectra_filter">
+      <param name="type" type="select" label="Apply Spectra Filter" help="">
+        <option value="none" select="true">None</option>
+        <option value="SpectraFilterNLargest">N Largest</option>
+        <option value="SpectraFilterNormalizer">Normalizer</option>
+        <option value="SpectraFilterScaler">Scaler</option>
+        <option value="SpectraFilterBernNorm">Bern et. al. normalization</option>
+        <option value="SpectraFilterMarkerMower">Marker Mower</option>
+        <option value="SpectraFilterParentPeakMower">Parent Peak Mower</option>
+        <option value="SpectraFilterSqrtMower">Square Root Mower</option>
+        <option value="SpectraFilterThresholdMower">Threshold Mower</option>
+        <option value="SpectraFilterWindowMower">Window Mower</option>
+      </param>
+      <when value="none">
+      </when>
+      <when value="SpectraFilterNLargest">
+        <!-- 1 param -->
+      </when>
+      <when value="SpectraFilterNormalizer">
+        <!-- 1 param -->
+      </when>
+      <when value="SpectraFilterScaler">
+        <!-- 3 params -->
+      </when>
+      <when value="SpectraFilterBernNorm">
+      </when>
+      <when value="SpectraFilterMarkerMower">
+      </when>
+      <when value="SpectraFilterParentPeakMower">
+        <!-- Tons of params -->
+      </when>
+      <when value="SpectraFilterSqrtMower">
+      </when>
+      <when value="SpectraFilterThresholdMower">
+        <!-- 1 param -->
+      </when>
+      <when value="SpectraFilterWindowMower">
+        <!-- 2 params -->
+      </when>
+    </conditional>    
+  </inputs>
+  <outputs>
+    <data format="mzml" name="output" />
+  </outputs>
+  <help>
+**What it does**
+
+**Citation**
+
+For the underlying tool, please cite ``Marc Sturm, Andreas Bertsch, Clemens Gröpl, Andreas Hildebrandt, Rene Hussong, Eva Lange, Nico Pfeifer, Ole Schulz-Trieglaff, Alexandra Zerck, Knut Reinert, and Oliver Kohlbacher, 2008. OpenMS – an Open-Source Software Framework for Mass Spectrometry. BMC Bioinformatics 9: 163. doi:10.1186/1471-2105-9-163.``
+
+If you use this tool in Galaxy, please cite Chilton J, et al. https://bitbucket.org/galaxyp/galaxyp-toolshed-openms    
+  </help>
+</tool>