com.compomics.util.experiment.filters.massspectrometry
Class SpectrumFilter

java.lang.Object
  extended by com.compomics.util.experiment.filters.massspectrometry.SpectrumFilter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
And, CombFilter, FingerprintPattern, MzFilter, Or, PeakFilter

public abstract class SpectrumFilter
extends java.lang.Object
implements java.io.Serializable

This class represent all spectrum filters which will be used to filter spectra.

Author:
Marc Vaudel
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          The name of the filter.
 
Constructor Summary
SpectrumFilter()
           
 
Method Summary
abstract  java.lang.String getDescription()
          Returns a description of the validated spectra, typically "containing a peak at m/z 114".
static java.lang.String[] getElementaryFilters()
          Convenience method returning the types of implemented elementary filters.
static SpectrumFilter getFilter(javax.swing.JFrame parentFrame, java.lang.Double mzTolerance, java.lang.Double intensityQuantile, java.lang.Double intensityTolerance, java.lang.Boolean isPpm)
          Allows the user to design basic filters via a GUI.
 java.lang.String getName()
          Returns the name of the filter.
 void setName(java.lang.String name)
          Sets the name of the filter.
abstract  boolean validateSpectrum(MSnSpectrum spectrum)
          Indicates whether a spectrum passed the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of the filter.

Constructor Detail

SpectrumFilter

public SpectrumFilter()
Method Detail

getName

public java.lang.String getName()
Returns the name of the filter.

Returns:
the name of the filter

setName

public void setName(java.lang.String name)
Sets the name of the filter.

Parameters:
name - the name of the filter

validateSpectrum

public abstract boolean validateSpectrum(MSnSpectrum spectrum)
Indicates whether a spectrum passed the filter.

Parameters:
spectrum - the spectrum to inspect
Returns:
a boolean indicating whether a spectrum passed the filter

getDescription

public abstract java.lang.String getDescription()
Returns a description of the validated spectra, typically "containing a peak at m/z 114".

Returns:
a description of the validated spectra

getElementaryFilters

public static java.lang.String[] getElementaryFilters()
Convenience method returning the types of implemented elementary filters.

Returns:
the types of implemented elementary filters

getFilter

public static SpectrumFilter getFilter(javax.swing.JFrame parentFrame,
                                       java.lang.Double mzTolerance,
                                       java.lang.Double intensityQuantile,
                                       java.lang.Double intensityTolerance,
                                       java.lang.Boolean isPpm)
Allows the user to design basic filters via a GUI.

Parameters:
parentFrame - the parent frame
mzTolerance - the mz tolerance, can be null
intensityQuantile - the intensity quantile, can be null
intensityTolerance - the intensity tolerance, can be null
isPpm - a boolean indicating whether the tolerance is in ppm, can be null
Returns:
the filter as designed by the user. Null if none.


Copyright © 2013. All Rights Reserved.