com.compomics.util.preferences
Class IdFilter

java.lang.Object
  extended by com.compomics.util.preferences.IdFilter
All Implemented Interfaces:
Serializable

public class IdFilter
extends Object
implements Serializable

This class achieves a pre-filtering of the identifications for PeptideShaker.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
IdFilter()
          Constructor with default settings.
IdFilter(int minPepLength, int maxPepLength, double mascotMaxEvalue, double omssaMaxEvalue, double xtandemMaxEvalue, double maxMzDeviation, boolean isPpm, boolean unknownPTM)
          Constructor for an Identification filter.
 
Method Summary
 boolean equals(IdFilter anotherFilter)
          Indicates whether this filter is the same as another one.
 double getMascotMaxEvalue()
          Returns the maximal Mascot e-value allowed.
 double getMaxMzDeviation()
          Returns the maximal m/z deviation allowed.
 int getMaxPepLength()
          Returns the maximal peptide length allowed.
 int getMinPepLength()
          Returns the maximal peptide length allowed.
 double getOmssaMaxEvalue()
          Returns the OMSSA maximal e-value allowed.
 double getXtandemMaxEvalue()
          Returns the maximal X!Tandem e-value allowed.
 boolean isIsPpm()
          Indicates whether the mass tolerance is in ppm (true) or Dalton (false).
 boolean removeUnknownPTMs()
          Returns a boolean indicating whether unknown PTMs shall be removed.
 void setIsPpm(boolean isPpm)
          Sets whether the mass tolerance is in ppm (true) or Dalton (false).
 void setMascotMaxEvalue(double mascotMaxEvalue)
          Sets the maximal Mascot e-value allowed.
 void setMaxMzDeviation(double maxMzDeviation)
          Sets the maximal m/z deviation allowed.
 void setMaxPepLength(int maxPepLength)
          Sets the maximal peptide length allowed.
 void setMinPepLength(int minPepLength)
          Sets the maximal peptide length allowed.
 void setOmssaMaxEvalue(double omssaMaxEvalue)
          Sets the OMSSA maximal e-value allowed.
 void setRemoveUnknownPTMs(boolean unknownPtm)
          Set whether unknown PTMs shall be removed.
 void setXtandemMaxEvalue(double xtandemMaxEvalue)
          Sets the OMSSA maximal e-value allowed.
 boolean validateModifications(Peptide peptide, ProteinMatch.MatchingType matchingType, Double massTolerance)
          Validates the modifications of a peptide.
 boolean validatePeptideAssumption(PeptideAssumption assumption)
          Validates the peptide assumption based on the peptide length and maximal e-values allowed.
 boolean validatePrecursor(PeptideAssumption assumption, String spectrumKey, SpectrumFactory spectrumFactory)
          Validates the mass deviation of a peptide assumption.
 boolean validateProteins(Peptide peptide)
          Validates a peptide depending on its protein inference status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdFilter

public IdFilter()
Constructor with default settings.


IdFilter

public IdFilter(int minPepLength,
                int maxPepLength,
                double mascotMaxEvalue,
                double omssaMaxEvalue,
                double xtandemMaxEvalue,
                double maxMzDeviation,
                boolean isPpm,
                boolean unknownPTM)
Constructor for an Identification filter.

Parameters:
minPepLength - The minimal peptide length allowed (0 or less for disabled)
maxPepLength - The maximal peptide length allowed (0 or less for disabled)
mascotMaxEvalue - The maximal Mascot e-value allowed (0 or less for disabled)
omssaMaxEvalue - The maximal OMSSA e-value allowed (0 or less for disabled)
xtandemMaxEvalue - The maximal X!Tandem e-value allowed (0 or less for disabled)
maxMzDeviation - The maximal m/z deviation allowed (0 or less for disabled)
isPpm - Boolean indicating the unit of the allowed m/z deviation (true: ppm, false: Da)
unknownPTM - Shall peptides presenting unknownPTMs be ignored
Method Detail

validatePeptideAssumption

public boolean validatePeptideAssumption(PeptideAssumption assumption)
Validates the peptide assumption based on the peptide length and maximal e-values allowed.

Parameters:
assumption - the assumption to validate
Returns:
a boolean indicating whether the assumption passed the test

validateProteins

public boolean validateProteins(Peptide peptide)
Validates a peptide depending on its protein inference status.

Parameters:
peptide - the peptide
Returns:
a boolean indicating whether the peptide passed the test

validateModifications

public boolean validateModifications(Peptide peptide,
                                     ProteinMatch.MatchingType matchingType,
                                     Double massTolerance)
Validates the modifications of a peptide.

Parameters:
peptide - the peptide of interest
matchingType - the peptide-protein matching type
massTolerance - the mass tolerance for matching type 'indistiguishibleAminoAcids'. Can be null otherwise
Returns:
a boolean indicating whether the peptide passed the test

validatePrecursor

public boolean validatePrecursor(PeptideAssumption assumption,
                                 String spectrumKey,
                                 SpectrumFactory spectrumFactory)
                          throws IOException,
                                 uk.ac.ebi.jmzml.xml.io.MzMLUnmarshallerException
Validates the mass deviation of a peptide assumption.

Parameters:
assumption - the considered peptide assumption
spectrumKey - the key of the spectrum used to get the precursor the precursor should be accessible via the spectrum factory
spectrumFactory - the spectrum factory
Returns:
a boolean indicating whether the given assumption passes the filter
Throws:
IOException
uk.ac.ebi.jmzml.xml.io.MzMLUnmarshallerException

removeUnknownPTMs

public boolean removeUnknownPTMs()
Returns a boolean indicating whether unknown PTMs shall be removed.

Returns:
a boolean indicating whether unknown PTMs shall be removed

setRemoveUnknownPTMs

public void setRemoveUnknownPTMs(boolean unknownPtm)
Set whether unknown PTMs shall be removed.

Parameters:
unknownPtm - whether unknown PTMs shall be removed

isIsPpm

public boolean isIsPpm()
Indicates whether the mass tolerance is in ppm (true) or Dalton (false).

Returns:
a boolean indicating whether the mass tolerance is in ppm (true) or Dalton (false)

setIsPpm

public void setIsPpm(boolean isPpm)
Sets whether the mass tolerance is in ppm (true) or Dalton (false).

Parameters:
isPpm - a boolean indicating whether the mass tolerance is in ppm (true) or Dalton (false)

getMascotMaxEvalue

public double getMascotMaxEvalue()
Returns the maximal Mascot e-value allowed.

Returns:
the maximal Mascot e-value allowed

setMascotMaxEvalue

public void setMascotMaxEvalue(double mascotMaxEvalue)
Sets the maximal Mascot e-value allowed.

Parameters:
mascotMaxEvalue - the maximal Mascot e-value allowed

getMaxMzDeviation

public double getMaxMzDeviation()
Returns the maximal m/z deviation allowed.

Returns:
the maximal mass deviation allowed

setMaxMzDeviation

public void setMaxMzDeviation(double maxMzDeviation)
Sets the maximal m/z deviation allowed.

Parameters:
maxMzDeviation - the maximal mass deviation allowed

getMaxPepLength

public int getMaxPepLength()
Returns the maximal peptide length allowed.

Returns:
the maximal peptide length allowed

setMaxPepLength

public void setMaxPepLength(int maxPepLength)
Sets the maximal peptide length allowed.

Parameters:
maxPepLength - the maximal peptide length allowed

getMinPepLength

public int getMinPepLength()
Returns the maximal peptide length allowed.

Returns:
the maximal peptide length allowed

setMinPepLength

public void setMinPepLength(int minPepLength)
Sets the maximal peptide length allowed.

Parameters:
minPepLength - the maximal peptide length allowed

getOmssaMaxEvalue

public double getOmssaMaxEvalue()
Returns the OMSSA maximal e-value allowed.

Returns:
the OMSSA maximal e-value allowed

setOmssaMaxEvalue

public void setOmssaMaxEvalue(double omssaMaxEvalue)
Sets the OMSSA maximal e-value allowed.

Parameters:
omssaMaxEvalue - the OMSSA maximal e-value allowed

getXtandemMaxEvalue

public double getXtandemMaxEvalue()
Returns the maximal X!Tandem e-value allowed.

Returns:
the OMSSA maximal e-value allowed

setXtandemMaxEvalue

public void setXtandemMaxEvalue(double xtandemMaxEvalue)
Sets the OMSSA maximal e-value allowed.

Parameters:
xtandemMaxEvalue - the OMSSA maximal e-value allowed

equals

public boolean equals(IdFilter anotherFilter)
Indicates whether this filter is the same as another one.

Parameters:
anotherFilter - another filter
Returns:
a boolean indicating that the filters have the same parameters


Copyright © 2013. All Rights Reserved.