Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | List of all members
IDFilter Class Reference

used to filter identifications by different criteria More...

#include <OpenMS/FILTERING/ID/IDFilter.h>

Public Member Functions

 IDFilter ()
 Constructor. More...
 
virtual ~IDFilter ()
 Destructor. More...
 
template<class IdentificationType >
void filterIdentificationsByThreshold (const IdentificationType &identification, DoubleReal threshold_fraction, IdentificationType &filtered_identification)
 filters a ProteinIdentification or PeptideIdentification by only allowing peptides/proteins which reach a score above threshold_fraction * SignificanceThreshold More...
 
template<class IdentificationType >
void filterIdentificationsByScore (const IdentificationType &identification, DoubleReal threshold_score, IdentificationType &filtered_identification)
 filters a ProteinIdentification or PeptideIdentification corresponding to the threshold_score More...
 
template<class IdentificationType >
void filterIdentificationsByBestNHits (const IdentificationType &identification, Size n, IdentificationType &filtered_identification)
 filters a ProteinIdentification or PeptideIdentification corresponding to the score. More...
 
template<class IdentificationType >
void filterIdentificationsByBestNToMHits (const IdentificationType &identification, Size n, Size m, IdentificationType &filtered_identification)
 filters a ProteinIdentification or PeptideIdentification corresponding to the score. More...
 
void filterIdentificationsByBestHits (const PeptideIdentification &identification, PeptideIdentification &filtered_identification, bool strict=false)
 filters a PeptideIdentification keeping only the best scoring hits (if strict is set, keeping only the best hit only if it is the only hit with that score) More...
 
void filterIdentificationsByProteins (const PeptideIdentification &identification, const std::vector< FASTAFile::FASTAEntry > &proteins, PeptideIdentification &filtered_identification, bool no_protein_identifiers=false)
 
void filterIdentificationsByProteins (const ProteinIdentification &identification, const std::vector< FASTAFile::FASTAEntry > &proteins, ProteinIdentification &filtered_identification)
 
void filterIdentificationsByExclusionPeptides (const PeptideIdentification &identification, const std::set< String > &peptides, PeptideIdentification &filtered_identification)
 removes all peptide hits having a sequence equal to a element in peptides More...
 
void filterIdentificationsByLength (const PeptideIdentification &identification, PeptideIdentification &filtered_identification, Size min_length, Size max_length=UINT_MAX)
 only peptides having a length equal to or greater than 'min_length' will be kept, if 'max_length' is actually greater or equal 'min_length', also only peptides having a length less or equal to 'max_length' will be kept More...
 
void filterIdentificationsByCharge (const PeptideIdentification &identification, Int charge, PeptideIdentification &filtered_identification)
 only peptides that have a charge equal to or greater than 'charge' will be kept More...
 
void filterIdentificationsByVariableModifications (const PeptideIdentification &identification, const std::vector< String > &fixed_modifications, PeptideIdentification &filtered_identification)
 only peptides having a variable modification will be kept More...
 
void removeUnreferencedProteinHits (const ProteinIdentification &identification, const std::vector< PeptideIdentification > peptide_identifications, ProteinIdentification &filtered_identification)
 only protein hits in 'identification' which are referenced by a peptide in 'peptide_identifications' are kept More...
 
void filterIdentificationsUnique (const PeptideIdentification &identification, PeptideIdentification &filtered_identification)
 if a peptide hit occurs more than once per PSM, only one instance is kept More...
 
void filterIdentificationsByMzError (const PeptideIdentification &identification, DoubleReal mass_error, bool unit_ppm, PeptideIdentification &filtered_identification)
 filter identifications by deviation to the theoretical mass More...
 
void filterIdentificationsByRTPValues (const PeptideIdentification &identification, PeptideIdentification &filtered_identification, DoubleReal p_value=0.05)
 Filters the peptide hits according to their predicted rt p-values. More...
 
void filterIdentificationsByRTFirstDimPValues (const PeptideIdentification &identification, PeptideIdentification &filtered_identification, DoubleReal p_value=0.05)
 Filters the peptide hits according to their predicted rt p-values of the first dimension. More...
 
template<class PeakT >
void filterIdentificationsByThresholds (MSExperiment< PeakT > &experiment, DoubleReal peptide_threshold_fraction, DoubleReal protein_threshold_fraction)
 filters an MS/MS experiment corresponding to the threshold_fractions More...
 
template<class PeakT >
void filterIdentificationsByScores (MSExperiment< PeakT > &experiment, DoubleReal peptide_threshold_score, DoubleReal protein_threshold_score)
 filters an MS/MS experiment corresponding to the threshold_fractions More...
 
template<class PeakT >
void filterIdentificationsByBestNHits (MSExperiment< PeakT > &experiment, Size n)
 filters an MS/MS experiment corresponding to the best n hits for every spectrum More...
 
template<class PeakT >
void filterIdentificationsByProteins (MSExperiment< PeakT > &experiment, const std::vector< FASTAFile::FASTAEntry > &proteins)
 filters an MS/MS experiment corresponding to the given proteins More...
 

Detailed Description

used to filter identifications by different criteria

The identifications are filtered by significance thresholds and by sequences. The filtering by significance thresholds looks for the best ProteinIdentification that fullfills the significance threshold criterium. score > significance-threshold * significance_fraction. The filtering by sequences looks for the best ProteinIdentification that is contained in one of the protein sequences.

TODO: fix design of filter functions. There will be an error e.g. if input and output points to the same PeptideIdentification.

Constructor & Destructor Documentation

IDFilter ( )

Constructor.

virtual ~IDFilter ( )
virtual

Destructor.

Member Function Documentation

void filterIdentificationsByBestHits ( const PeptideIdentification identification,
PeptideIdentification filtered_identification,
bool  strict = false 
)

filters a PeptideIdentification keeping only the best scoring hits (if strict is set, keeping only the best hit only if it is the only hit with that score)

void filterIdentificationsByBestNHits ( const IdentificationType &  identification,
Size  n,
IdentificationType &  filtered_identification 
)
inline

filters a ProteinIdentification or PeptideIdentification corresponding to the score.

If the method higherScoreBetter() returns true for the IdentificationType the n highestscoring hits are kept. Otherwise the n lowest scoring hits are kept.

void filterIdentificationsByBestNHits ( MSExperiment< PeakT > &  experiment,
Size  n 
)
inline
void filterIdentificationsByBestNToMHits ( const IdentificationType &  identification,
Size  n,
Size  m,
IdentificationType &  filtered_identification 
)
inline

filters a ProteinIdentification or PeptideIdentification corresponding to the score.

If the method higherScoreBetter() returns true for the IdentificationType the n to m highestscoring hits are kept. Otherwise the n to m lowest scoring hits are kept. This method is useful if a range of higher hits are used for decoy fairness analysis.

void filterIdentificationsByCharge ( const PeptideIdentification identification,
Int  charge,
PeptideIdentification filtered_identification 
)

only peptides that have a charge equal to or greater than 'charge' will be kept

void filterIdentificationsByExclusionPeptides ( const PeptideIdentification identification,
const std::set< String > &  peptides,
PeptideIdentification filtered_identification 
)

removes all peptide hits having a sequence equal to a element in peptides

void filterIdentificationsByLength ( const PeptideIdentification identification,
PeptideIdentification filtered_identification,
Size  min_length,
Size  max_length = UINT_MAX 
)

only peptides having a length equal to or greater than 'min_length' will be kept, if 'max_length' is actually greater or equal 'min_length', also only peptides having a length less or equal to 'max_length' will be kept

void filterIdentificationsByMzError ( const PeptideIdentification identification,
DoubleReal  mass_error,
bool  unit_ppm,
PeptideIdentification filtered_identification 
)

filter identifications by deviation to the theoretical mass

void filterIdentificationsByProteins ( const PeptideIdentification identification,
const std::vector< FASTAFile::FASTAEntry > &  proteins,
PeptideIdentification filtered_identification,
bool  no_protein_identifiers = false 
)

filters a PeptideIdentification corresponding to the given proteins PeptideHits with no matching proteins are removed. Matching is done either based on accessions or on sequence (if no accessions are given, or no_protein_identifiers is set)

void filterIdentificationsByProteins ( const ProteinIdentification identification,
const std::vector< FASTAFile::FASTAEntry > &  proteins,
ProteinIdentification filtered_identification 
)

filters a ProteinIdentification corresponding to the given proteins ProteinHits with no matching proteins are removed. Matching is done based on accessions only

void filterIdentificationsByProteins ( MSExperiment< PeakT > &  experiment,
const std::vector< FASTAFile::FASTAEntry > &  proteins 
)
inline

filters an MS/MS experiment corresponding to the given proteins

References PeptideIdentification::getHits(), and MSExperiment< PeakT, ChromatogramPeakT >::size().

void filterIdentificationsByRTFirstDimPValues ( const PeptideIdentification identification,
PeptideIdentification filtered_identification,
DoubleReal  p_value = 0.05 
)

Filters the peptide hits according to their predicted rt p-values of the first dimension.

Filters the peptide hits of this ProteinIdentification by the probability (p-value) of a correct ProteinIdentification having a deviation between observed and predicted rt equal or bigger than allowed.

void filterIdentificationsByRTPValues ( const PeptideIdentification identification,
PeptideIdentification filtered_identification,
DoubleReal  p_value = 0.05 
)

Filters the peptide hits according to their predicted rt p-values.

Filters the peptide hits of this ProteinIdentification by the probability (p-value) of a correct ProteinIdentification having a deviation between observed and predicted rt equal or bigger than allowed.

void filterIdentificationsByScore ( const IdentificationType &  identification,
DoubleReal  threshold_score,
IdentificationType &  filtered_identification 
)
inline

filters a ProteinIdentification or PeptideIdentification corresponding to the threshold_score

If the method higherScoreBetter() returns true for the IdentificationType all hits with a score smaller than threshold_score are removed. Otherwise all hits with a score bigger than threshold_score are removed.

void filterIdentificationsByScores ( MSExperiment< PeakT > &  experiment,
DoubleReal  peptide_threshold_score,
DoubleReal  protein_threshold_score 
)
inline
void filterIdentificationsByThreshold ( const IdentificationType &  identification,
DoubleReal  threshold_fraction,
IdentificationType &  filtered_identification 
)
inline

filters a ProteinIdentification or PeptideIdentification by only allowing peptides/proteins which reach a score above threshold_fraction * SignificanceThreshold

void filterIdentificationsByThresholds ( MSExperiment< PeakT > &  experiment,
DoubleReal  peptide_threshold_fraction,
DoubleReal  protein_threshold_fraction 
)
inline
void filterIdentificationsByVariableModifications ( const PeptideIdentification identification,
const std::vector< String > &  fixed_modifications,
PeptideIdentification filtered_identification 
)

only peptides having a variable modification will be kept

void filterIdentificationsUnique ( const PeptideIdentification identification,
PeptideIdentification filtered_identification 
)

if a peptide hit occurs more than once per PSM, only one instance is kept

void removeUnreferencedProteinHits ( const ProteinIdentification identification,
const std::vector< PeptideIdentification peptide_identifications,
ProteinIdentification filtered_identification 
)

only protein hits in 'identification' which are referenced by a peptide in 'peptide_identifications' are kept


OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:30 using doxygen 1.8.5