com.compomics.util.experiment.filters.massspectrometry.spectrumfilters
Class PeakFilter

java.lang.Object
  extended by com.compomics.util.experiment.filters.massspectrometry.SpectrumFilter
      extended by com.compomics.util.experiment.filters.massspectrometry.spectrumfilters.PeakFilter
All Implemented Interfaces:
Serializable

public class PeakFilter
extends SpectrumFilter

A peak filter.

Author:
Marc Vaudel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.compomics.util.experiment.filters.massspectrometry.SpectrumFilter
name
 
Constructor Summary
PeakFilter(double mz, double mzTolerance, boolean isPpm, double intensity, double intensityTolerance)
          Constructor.
 
Method Summary
 String getDescription()
          Returns a description of the validated spectra, typically "containing a peak at m/z 114".
 double getError(double otherMz)
          Get the absolute matching error in Da.
 boolean validateSpectrum(MSnSpectrum spectrum)
          Indicates whether a peak was found in the spectrum at the desired m/z in the given intensity quartile.
 
Methods inherited from class com.compomics.util.experiment.filters.massspectrometry.SpectrumFilter
getElementaryFilters, getFilter, getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeakFilter

public PeakFilter(double mz,
                  double mzTolerance,
                  boolean isPpm,
                  double intensity,
                  double intensityTolerance)
Constructor.

Parameters:
mz - the m/z to look for
mzTolerance - the m/z tolerance
isPpm - a boolean indicating whether the m/z tolerance is in ppm
intensity - the intensity to look for
intensityTolerance - the intensity relative tolerance (0.1 for 10%)
Method Detail

validateSpectrum

public boolean validateSpectrum(MSnSpectrum spectrum)
Indicates whether a peak was found in the spectrum at the desired m/z in the given intensity quartile.

Specified by:
validateSpectrum in class SpectrumFilter
Parameters:
spectrum - the spectrum to inspect
Returns:
a boolean indicating whether a peak was found in the spectrum at the desired m/z in the given intensity quartile

getError

public double getError(double otherMz)
Get the absolute matching error in Da.

Parameters:
otherMz -
Returns:
the absolute matching error

getDescription

public String getDescription()
Description copied from class: SpectrumFilter
Returns a description of the validated spectra, typically "containing a peak at m/z 114".

Specified by:
getDescription in class SpectrumFilter
Returns:
a description of the validated spectra


Copyright © 2012. All Rights Reserved.