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

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

public class MzFilter
extends SpectrumFilter

This class checks whether a peak is present in a spectrum among the most intense peaks.

Author:
Marc Vaudel
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.compomics.util.experiment.filters.massspectrometry.SpectrumFilter
name
 
Constructor Summary
MzFilter(double mz, double mzTolerance, boolean isPpm, double intensityQuantile)
          Constructor.
MzFilter(MzFilter brotherFilter, double mz)
          Creates a filter from a similar filter.
 
Method Summary
 java.lang.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.
 double getIntensityQuantile()
          Returns the intensity quantile to look into.
 java.util.ArrayList<java.lang.Double> getMzArray()
          Returns the mzArray.
 double getMzTolerance()
          Returns the m/z tolerance to search with.
 java.lang.String getSpectrumLoaded()
          Returns the key of the spectrum loaded.
 boolean isPpm()
          Returns a boolean indicating whether the m/z tolerance is in ppm.
 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

MzFilter

public MzFilter(double mz,
                double mzTolerance,
                boolean isPpm,
                double intensityQuantile)
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
intensityQuantile - the intensity quantile to look into

MzFilter

public MzFilter(MzFilter brotherFilter,
                double mz)
Creates a filter from a similar filter.

Parameters:
brotherFilter - another filter
mz - the other m/z to look for
Method Detail

getMzTolerance

public double getMzTolerance()
Returns the m/z tolerance to search with.

Returns:
the m/z tolerance

isPpm

public boolean isPpm()
Returns a boolean indicating whether the m/z tolerance is in ppm.

Returns:
a boolean indicating whether the m/z tolerance is in ppm

getIntensityQuantile

public double getIntensityQuantile()
Returns the intensity quantile to look into.

Returns:
the intensity quantile

getSpectrumLoaded

public java.lang.String getSpectrumLoaded()
Returns the key of the spectrum loaded.

Returns:
the key of the spectrum loaded

getMzArray

public java.util.ArrayList<java.lang.Double> getMzArray()
Returns the mzArray.

Returns:
the mzArray

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 java.lang.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 © 2013. All Rights Reserved.