public class IdFilter extends Object implements Serializable
Constructor and Description |
---|
IdFilter()
Constructor with default settings.
|
IdFilter(int minPepLength,
int maxPepLength,
double maxMzDeviation,
boolean isPpm,
boolean unknownPTM)
Constructor for an Identification filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(IdFilter anotherFilter)
Indicates whether this filter is the same as another one.
|
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.
|
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 |
setFilterFromSearchParameters(SearchParameters searchParameters)
Updates the filter based on the search parameters.
|
void |
setIsPpm(boolean isPpm)
Sets whether the mass tolerance is in ppm (true) or Dalton (false).
|
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 |
setRemoveUnknownPTMs(boolean unknownPtm)
Set whether unknown PTMs shall be removed.
|
boolean |
validateModifications(Peptide peptide,
SequenceMatchingPreferences sequenceMatchingPreferences,
SequenceMatchingPreferences ptmSequenceMatchingPreferences,
ModificationProfile modificationProfile)
Validates the modifications of a peptide.
|
boolean |
validatePeptide(Peptide peptide,
SequenceMatchingPreferences sequenceMatchingPreferences)
Validates the peptide based on the peptide length and share of X's in the
sequence.
|
boolean |
validatePrecursor(PeptideAssumption assumption,
String spectrumKey,
SpectrumFactory spectrumFactory)
Validates the mass deviation of a peptide assumption.
|
boolean |
validateProteins(Peptide peptide,
SequenceMatchingPreferences sequenceMatchingPreferences)
Validates a peptide depending on its protein inference status.
|
boolean |
validateProteins(Peptide peptide,
SequenceMatchingPreferences sequenceMatchingPreferences,
ProteinTree proteinTree)
Validates a peptide depending on its protein inference status.
|
public IdFilter()
public IdFilter(int minPepLength, int maxPepLength, double maxMzDeviation, boolean isPpm, boolean unknownPTM)
minPepLength
- The minimal peptide length allowed (0 or less for
disabled)maxPepLength
- The maximal peptide length 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 ignoredpublic void setFilterFromSearchParameters(SearchParameters searchParameters)
searchParameters
- the search parameters where to take the
information frompublic boolean validatePeptide(Peptide peptide, SequenceMatchingPreferences sequenceMatchingPreferences)
peptide
- the peptide to validatesequenceMatchingPreferences
- the sequence matching preferences
containing the maximal share of X's allowedpublic boolean validateProteins(Peptide peptide, SequenceMatchingPreferences sequenceMatchingPreferences) throws IOException, SQLException, ClassNotFoundException, InterruptedException
peptide
- the peptidesequenceMatchingPreferences
- the sequence matching preferencesIOException
- if an IOException occursSQLException
- if an SQLException occursClassNotFoundException
- if a ClassNotFoundException occursInterruptedException
- if an InterruptedException occurspublic boolean validateProteins(Peptide peptide, SequenceMatchingPreferences sequenceMatchingPreferences, ProteinTree proteinTree) throws IOException, SQLException, ClassNotFoundException, InterruptedException
peptide
- the peptidesequenceMatchingPreferences
- the sequence matching preferencesproteinTree
- the protein tree to use for peptide to protein mappingIOException
- if an IOException occursSQLException
- if an SQLException occursClassNotFoundException
- if a ClassNotFoundException occursInterruptedException
- if an InterruptedException occurspublic boolean validateModifications(Peptide peptide, SequenceMatchingPreferences sequenceMatchingPreferences, SequenceMatchingPreferences ptmSequenceMatchingPreferences, ModificationProfile modificationProfile)
peptide
- the peptide of interestsequenceMatchingPreferences
- the sequence matching preferences for
peptide to protein mappingptmSequenceMatchingPreferences
- the sequence matching preferences
for PTM to peptide mappingmodificationProfile
- the modification profile of the identificationpublic boolean validatePrecursor(PeptideAssumption assumption, String spectrumKey, SpectrumFactory spectrumFactory) throws IOException, uk.ac.ebi.jmzml.xml.io.MzMLUnmarshallerException
assumption
- the considered peptide assumptionspectrumKey
- the key of the spectrum used to get the precursor the
precursor should be accessible via the spectrum factoryspectrumFactory
- the spectrum factoryIOException
- if an IOException occursuk.ac.ebi.jmzml.xml.io.MzMLUnmarshallerException
- if an MzMLUnmarshallerException occurspublic boolean removeUnknownPTMs()
public void setRemoveUnknownPTMs(boolean unknownPtm)
unknownPtm
- whether unknown PTMs shall be removedpublic boolean isIsPpm()
public void setIsPpm(boolean isPpm)
isPpm
- a boolean indicating whether the mass tolerance is in ppm
(true) or Dalton (false)public double getMaxMzDeviation()
public void setMaxMzDeviation(double maxMzDeviation)
maxMzDeviation
- the maximal mass deviation allowedpublic int getMaxPepLength()
public void setMaxPepLength(int maxPepLength)
maxPepLength
- the maximal peptide length allowedpublic int getMinPepLength()
public void setMinPepLength(int minPepLength)
minPepLength
- the maximal peptide length allowedpublic boolean equals(IdFilter anotherFilter)
anotherFilter
- another filterCopyright © 2015. All rights reserved.