Matrix Science header
Public Types | Public Member Functions

ms_quant_helper Class Reference
[Quantitation analysis for Mascot Server and Distiller]

Helper routines for peptide quantitation. More...

#include <ms_quant_helper.hpp>

Inheritance diagram for ms_quant_helper:
Inheritance graph
[legend]
Collaboration diagram for ms_quant_helper:
Collaboration graph
[legend]

List of all members.

Public Types

enum  PEPTIDE_QUALITY {
  PEPTIDE_QUALITY_IS_OK = 0x0000,
  PEPTIDE_CHARGE_BELOW_PRECURSOR_MIN = 0x0001,
  PEPTIDE_SCORE_BELOW_SCORE_THR = 0x0002,
  PEPTIDE_EXPECT_ABOVE_THRESHOLD = 0x0003,
  PEPTIDE_SCORE_BELOW_IDENTITY_THR = 0x0004,
  PEPTIDE_SCORE_BELOW_IDENTITY_THR_NOHOM = 0x0005,
  PEPTIDE_SCORE_BELOW_HOMOLOGY_THR = 0x0006,
  PEPTIDE_NOT_UNIQUE = 0x0007,
  PEPTIDE_QUALITY_UNAVAILABLE = 0xf000
}
 

Possible reasons why a peptide does not pass quality tests using a given quantitation method.

More...
enum  PEPTIDE_QUANTIFIABILITY {
  PEPTIDE_IS_QUANTIFIABLE = 0x0000,
  PEPTIDE_HAS_NO_REQUIRED_FIXEDMOD = 0x0001,
  PEPTIDE_HAS_NO_REQUIRED_VARMOD = 0x0002,
  PEPTIDE_HAS_EXCLUDED_FIXEDMOD = 0x0010,
  PEPTIDE_HAS_EXCLUDED_LOCAL_FIXEDMOD = 0x0011,
  PEPTIDE_HAS_EXCLUDED_VARMOD = 0x0012,
  PEPTIDE_HAS_UNMODIFIED_SITE = 0x0013,
  PEPTIDE_HAS_EXCLUDED_LOCAL_VARMOD = 0x0014,
  PEPTIDE_HAS_NO_EXCLUSIVE_MODS = 0x0015,
  PEPTIDE_QUANTIFIABILITY_UNAVAILABLE = 0xf000
}
 

Possible reasons a peptide is not quantifiable using a given quantitation method.

More...

Public Member Functions

 ms_quant_helper (const ms_peptidesummary &pepsum, const ms_quant_method &qm, const ms_umod_configfile &umodfile)
 Default constructor.
 ~ms_quant_helper ()
 Destructor.
void appendErrors (const ms_errors &src)
 Copies all errors from another instance and appends them at the end of own list.
void clearAllErrors ()
 Remove all errors from the current list of errors.
void copyFrom (const ms_errors *right)
 Use this member to make a copy of another instance.
int createMissingComponents (matrix_science::ms_ms1quant_match *match) const
 Create any missing components and return the number of new components created.
const ms_errsgetErrorHandler () const
 Retrive the error object using this function to get access to all errors and error parameters.
int getLastError () const
 Return the error description of the last error that occurred.
std::string getLastErrorString () const
 Return the error description of the last error that occurred.
int isPeptideQualityOK (int q, int p, std::string &reasonStrRef) const
 Given a peptide, test whether it passes the quality thresholds.
int isPeptideQuantifiable (int q, int p, const ms_protein *protein, int peptideIndex, std::string &reasonStrRef) const
 Given a peptide and the residues before and after, test whether it is quantifiable.
bool isValid () const
 Call this function to determine if there have been any errors.

Detailed Description

Helper routines for peptide quantitation.


Member Enumeration Documentation

Possible reasons why a peptide does not pass quality tests using a given quantitation method.

Enumerator:
PEPTIDE_QUALITY_IS_OK 

Peptide passes quality thresholds.

PEPTIDE_CHARGE_BELOW_PRECURSOR_MIN 

Peptide charge is less than minimum precursor charge.

PEPTIDE_SCORE_BELOW_SCORE_THR 

Peptide score is below threshold.

PEPTIDE_EXPECT_ABOVE_THRESHOLD 

Peptide expect value exceeds threshold.

PEPTIDE_SCORE_BELOW_IDENTITY_THR 

Peptide score is below identity threshold.

PEPTIDE_SCORE_BELOW_IDENTITY_THR_NOHOM 

Peptide score is below identity threshold (no homology threshold available).

PEPTIDE_SCORE_BELOW_HOMOLOGY_THR 

Peptide score is below homology threshold.

PEPTIDE_NOT_UNIQUE 

Peptide is not unique.

PEPTIDE_QUALITY_UNAVAILABLE 

Quality cannot be determined.

Possible reasons a peptide is not quantifiable using a given quantitation method.

Enumerator:
PEPTIDE_IS_QUANTIFIABLE 

Peptide is quantifiable using the given quantitation method.

PEPTIDE_HAS_NO_REQUIRED_FIXEDMOD 

Peptide is missing a required fixed modification.

PEPTIDE_HAS_NO_REQUIRED_VARMOD 

Peptide is missing a required variable modification.

PEPTIDE_HAS_EXCLUDED_FIXEDMOD 

Peptide has an excluded fixed modification.

PEPTIDE_HAS_EXCLUDED_LOCAL_FIXEDMOD 

Peptide has an excluded fixed modification, defined in the local modification definitions.

PEPTIDE_HAS_EXCLUDED_VARMOD 

Peptide has an excluded variable modification.

PEPTIDE_HAS_UNMODIFIED_SITE 

Peptide has an unmodified site where required modification should be.

PEPTIDE_HAS_EXCLUDED_LOCAL_VARMOD 

Peptide has an excluded variable modification, defined in the local modification definitions.

PEPTIDE_HAS_NO_EXCLUSIVE_MODS 

Peptide has none of the exclusive modifications (only tested when constrain search is disabled).

PEPTIDE_QUANTIFIABILITY_UNAVAILABLE 

Quantifiability cannot be determined.


Constructor & Destructor Documentation

ms_quant_helper ( const ms_peptidesummary pepsum,
const ms_quant_method qm,
const ms_umod_configfile umodfile 
)

Default constructor.

The object should receive the full quantitation method, including, in particular, component definitions and peptide quality settings. If the quantitation method is missing either set of settings, the corresponding methods will return the status "unavailable".

The constructor creates a copy of the relevant bits of the quantitation method and stores those internally. If you change the quantitation method later, you must create a new ms_quant_helper object.

Parameters:
pepsumMascot results file whose peptide matches are to be tested.
qmQuantitation method with component definitions, peptide quality settings and report ratio definitions.
umodfileUnimod configuration file for looking up modification specificities.

Member Function Documentation

void appendErrors ( const ms_errors src ) [inherited]

Copies all errors from another instance and appends them at the end of own list.

Parameters:
srcThe object to copy the errors across from. See Maintaining object references: two rules of thumb.
void clearAllErrors (  ) [inherited]

Remove all errors from the current list of errors.

The list of 'errors' can include fatal errors, warning messages, information messages and different levels of debugging messages.

All messages are accumulated into a list in this object, until clearAllErrors() is called.

See Error Handling.

See also:
isValid(), getLastError(), getLastErrorString(), getErrorHandler()
Examples:
common_error.cpp, resfile_error.cpp, and resfile_summary.cpp.
void copyFrom ( const ms_errors right ) [inherited]

Use this member to make a copy of another instance.

Parameters:
rightis the source to initialise from
int createMissingComponents ( matrix_science::ms_ms1quant_match match ) const

Create any missing components and return the number of new components created.

Only supports the "precursor" protocol. Other protocols do nothing and return 0

For precursor, this will add the 'derived' matches. For example, if there is a peptide match to the light component, it will add an expected heavy match, even though there is no search ID for the heavy match.

Parameters:
matchcontains the peptide match to which new 'components' are to be added.
Returns:
the number of new components added to the match
const ms_errs * getErrorHandler (  ) const [inherited]

Retrive the error object using this function to get access to all errors and error parameters.

See Error Handling.

Returns:
Constant pointer to the error handler
See also:
isValid(), getLastError(), getLastErrorString(), clearAllErrors(), getErrorHandler()
Examples:
common_error.cpp, and http_helper_getstring.cpp.
int getLastError (  ) const [inherited]

Return the error description of the last error that occurred.

All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.

See Error Handling.

See also:
isValid(), getLastErrorString(), clearAllErrors(), getErrorHandler()
Returns:
the error number of the last error, or 0 if there have been no errors.

Reimplemented in ms_mascotresfile.

std::string getLastErrorString (  ) const [inherited]

Return the error description of the last error that occurred.

All errors are accumulated into a list in this object, until clearAllErrors() is called. This function returns the last error that occurred.

Returns:
Most recent error, warning, information or debug message

See Error Handling.

See also:
isValid(), getLastError(), clearAllErrors(), getErrorHandler()

Reimplemented in ms_mascotresfile.

Examples:
common_error.cpp, config_enzymes.cpp, config_fragrules.cpp, config_license.cpp, config_mascotdat.cpp, config_masses.cpp, config_modfile.cpp, config_procs.cpp, config_quantitation.cpp, config_taxonomy.cpp, http_helper_getstring.cpp, and tools_aahelper.cpp.
int isPeptideQualityOK ( int  q,
int  p,
std::string &  reasonStrRef 
) const

Given a peptide, test whether it passes the quality thresholds.

The peptide identified by query q and rank p is tested against peptide quality settings in the quantitation method. If it does not pass all of the quality tests (e.g. score thresholds), the corresponding status is returned; see PEPTIDE_QUALITY for details.

The method defers loading the full peptide object until it is really needed, if at all. Significance tests and score and expect value thresholds can be conducted without loading the peptide object in its entirety. This means the method is fast both when caching is in use and without caching.

See Multiple return values in Perl, Java, Python and C#.

Parameters:
[in]qPeptide query.
[in]pPeptide rank.
[out]reasonStrRefis a free-text description of the return status is assigned to the variable. If status is PEPTIDE_QUALITY_IS_OK, reasonStrRef will be the empty string. If status is PEPTIDE_QUALITY_UNAVAILABLE, reasonStrRef will not be changed by this method.
Returns:
Status describing whether the peptide meets all the requirements to be quantifiable using the quantitation method.
int isPeptideQuantifiable ( int  q,
int  p,
const ms_protein protein,
int  peptideIndex,
std::string &  reasonStrRef 
) const

Given a peptide and the residues before and after, test whether it is quantifiable.

The method first loads the peptide with query q and rank p. The peptide is tested against component definitions in the quantitation method. If it is missing required modifications, or if it contains excluded modifications, the corresponding status is returned; see PEPTIDE_QUANTIFIABILITY for details.

If the quantitation method does not contain suitable component definitions, the return status is PEPTIDE_QUANTIFIABILITY_UNAVAILABLE.

See Multiple return values in Perl, Java, Python and C#

Parameters:
[in]qPeptide query.
[in]pPeptide rank.
[in]proteinProtein hit to which the peptide match is assigned. This is only needed in the case where a quality parameter is specified to exclude an unmodified protein N- or C-terminus residue. In this case, this code needs to know if the flanking residue is the corresponding protein terminus. The same peptide may appear in multiple proteins, and may be at the terminus of just one of them, so if you need all peptides that may be quantifiable, pass 0 or NULL.
[in]peptideIndexInteger index of the peptide match in the protein hit, between 1 and protein->getNumPeptides(). If protein is null, use 0.
[out]reasonStrRefis a free-text description of the return status is assigned to the variable. If status is PEPTIDE_IS_QUANTIFIABLE, reasonStrRef will be the empty string. If status is PEPTIDE_QUANTIFIABILITY_UNAVAILABLE, reasonStrRef will not be changed by this method.
Returns:
Status describing whether the peptide meets all the requirements to be quantifiable using the quantitation method.
bool isValid (  ) const [inherited]

Call this function to determine if there have been any errors.

This will return true unless there have been any fatal errors.

See Error Handling.

Returns:
True if no fatal error occured
See also:
getLastError(), getLastErrorString(), clearAllErrors(), getErrorHandler()
Examples:
common_error.cpp, config_enzymes.cpp, config_fragrules.cpp, config_license.cpp, config_mascotdat.cpp, config_masses.cpp, config_modfile.cpp, config_procs.cpp, config_quantitation.cpp, config_taxonomy.cpp, http_helper_getstring.cpp, peptide_list.cpp, resfile_summary.cpp, and tools_aahelper.cpp.

The documentation for this class was generated from the following files:

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:36