Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_mascotresults_params Class Reference

Class which provides constructor parameters for either ms_peptidesummary or ms_proteinsummary. More...

#include <ms_mascotresults_params.hpp>

Public Member Functions

 ms_mascotresults_params (const ms_mascotresults_params &src)
 Copying constructor.
 
 ms_mascotresults_params (const unsigned int flags=ms_mascotresults::MSRES_GROUP_PROTEINS, double minProbability=0.05, int maxHitsToReport=0, const char *unigeneIndexFile=0, double ignoreIonsScoreBelow=0.0, int minPepLenInPepSummary=0, const char *singleHit=0, const unsigned int flags2=ms_peptidesummary::MSPEPSUM_NONE)
 Call this method once to create the ms_mascotresults_params.
 
void copyFrom (const ms_mascotresults_params *right)
 Copies all data from another instance of the class.
 
unsigned int getFlags () const
 Returns the value of the flags parameter if available.
 
unsigned int getFlags2 () const
 Returns the value of the flags2 parameter if available.
 
double getIgnoreIonsScoreBelow () const
 Returns the value of the ignoreIonsScoreBelow parameter if available.
 
int getMaxHitsToReport () const
 Returns the maximum number of protein hits to report.
 
int getMinNumSigUniqueSequences () const
 Returns the value of the MinNumSigUniqueSequences parameter.
 
int getMinPepLenInPeptideSummary () const
 Returns the minimum length of peptide match to use when generating a peptide summary report.
 
double getMinProbability () const
 Returns the significance threshold.
 
std::string getSingleHit () const
 Returns the optional single hit parameter used to get the results for a single hit quickly.
 
double getTargetFDR () const
 Returns the target FDR, if any.
 
ms_mascotresults::DECOY_STATS_COUNT_TYPE getTargetFDRType () const
 Returns the target FDR type.
 
std::string getUnigeneIndexFile () const
 Optional file path to a UniGene Index file.
 
bool isUsePeptideSummary () const
 Returns a hint as to whether a peptide or protein summary should be created.
 
ms_mascotresults_paramsoperator= (const ms_mascotresults_params &right)
 Assignment operator.
 
void setFlag (const ms_mascotresults::FLAGS flag, bool enabled)
 Toggles the value of an individual flag for use in the ms_mascotresults constructor.
 
void setFlag2 (const ms_peptidesummary::MSPEPSUM flag, bool enabled)
 Toggles the value of an individual flag used in the ms_peptidesummary constructor.
 
void setFlags (const unsigned int flags)
 Sets the value of the flags parameter for use in the ms_mascotresults constructor.
 
void setFlags2 (const unsigned int flags2)
 Sets the value of the flags2 parameter used in the ms_peptidesummary constructor.
 
void setIgnoreIonsScoreBelow (const double ignoreIonsScoreBelow)
 Sets the value of the ignoreIonsScoreBelow parameter.
 
void setMaxHitsToReport (const int maxHitsToReport)
 Sets the maximum number of protein hits to report.
 
void setMinNumSigUniqueSequences (const int n)
 Sets the value of the MinNumSigUniqueSequences parameter.
 
void setMinPepLenInPeptideSummary (const int minPepLenInPeptideSummary)
 Sets the minimum length of peptide match to use when generating a peptide summary report.
 
void setMinProbability (const double minProbability)
 Sets the significance threshold.
 
void setSingleHit (const char *singleHit)
 Sets the optional single hit parameter.
 
void setTargetFDR (double fdr)
 Sets the target FDR.
 
void setTargetFDRType (ms_mascotresults::DECOY_STATS_COUNT_TYPE fdrType)
 Sets the target FDR type.
 
void setUnigeneIndexFile (const char *unigeneIndexFile)
 Sets the optional file path to a UniGene Index file.
 
void setUsePeptideSummary (const bool usePeptideSummary)
 Set the hint as to whether a peptide or protein summary should be created.
 

Detailed Description

Class which provides constructor parameters for either ms_peptidesummary or ms_proteinsummary.

Constructor & Destructor Documentation

◆ ms_mascotresults_params() [1/2]

ms_mascotresults_params ( const unsigned int  flags = ms_mascotresults::MSRES_GROUP_PROTEINS,
double  minProbability = 0.05,
int  maxHitsToReport = 0,
const char *  unigeneIndexFile = 0,
double  ignoreIonsScoreBelow = 0.0,
int  minPepLenInPepSummary = 0,
const char *  singleHit = 0,
const unsigned int  flags2 = ms_peptidesummary::MSPEPSUM_NONE 
)

Call this method once to create the ms_mascotresults_params.

This object has fields for all of the flags and parameters required to create peptide and protein summary result objects. Both ms_peptidesummary and ms_proteinsummary have constructors which will accept an ms_mascotresults_params object.

You do not need to supply any of the parameter values when creating an ms_mascotresults_params object as all of the parameters have setter methods, allowing you to update their values. You can also set all of the required parameters for a result by calling the get_ms_mascotresults_params method of ms_mascotresfilebase.

Parameters
flagscan be one or more of the ms_mascotresults::FLAGS values OR'ed together
minProbabilityspecifies the significance threshold. See getMinProbability(). See also getTargetFDR().
maxHitsToReportis a maximum value of protein hits to report. See getMaxHitsToReport().
unigeneIndexFileis an optional file path to a UniGene Index file. This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.
  • From programming languages other than C++, pass an empty string object to specify no UniGene index file.
ignoreIonsScoreBelowis an optional flag for the peptide summary only. See getIgnoreIonsScoreBelow().
minPepLenInPepSummaryis an optional flag for the peptide summary only. Any peptides shorter than this will be ignored when grouping proteins (see Grouping proteins together).
singleHitshould only be used for getting the results for a single protein quickly. See setSingleHit().
flags2should be one or more of the ms_peptidesummary::MSPEPSUM flags OR'd together

◆ ms_mascotresults_params() [2/2]

Copying constructor.

Parameters
srcis the source to initialise from

Member Function Documentation

◆ copyFrom()

void copyFrom ( const ms_mascotresults_params right)

Copies all data from another instance of the class.

Parameters
rightis the source to initialise from

◆ getFlags()

unsigned int getFlags ( ) const

Returns the value of the flags parameter if available.

The value of the flags parameter should be one or more of the ms_mascotresults::FLAGS values OR'ed together.

Returns
The value of the flags parameter used by the ms_peptidesummary and ms_proteinsummary constructors

◆ getFlags2()

unsigned int getFlags2 ( ) const

Returns the value of the flags2 parameter if available.

Flags2 is an optional parameter for the peptide summary only. It's value should be one or more of the ms_peptidesummary::MSPEPSUM flags OR'ed together.

Returns
The value of the flags2 parameter used by the ms_peptidesummary constructor.

◆ getIgnoreIonsScoreBelow()

double getIgnoreIonsScoreBelow ( ) const

Returns the value of the ignoreIonsScoreBelow parameter if available.

ignoreIonsScoreBelow is an optional flag for the peptide summary only. Any peptides with a score less than this will be ignored. If the value is greater than 0 and less than 1 then this is assumed to to be a probability rather than an absolute score; the reciprocal of this value is passed to ms_peptidesummary::getPeptideThreshold() to determine the score cutoff.

A value of -1 is treated as equivalent to minProbability. This is the most convenient setting if you want to filter out non-significant matches.

If the search is an error tolerant search, any non-zero value is treated as equal to -1. That is, specifying IgnoreIonsScoreBelow = 0.0 will display all matches, and specifying any other value will display only significant matches.

Returns
The value of ignoreIonsScoreBelow to use in the ms_peptidesummary constructor

◆ getMaxHitsToReport()

int getMaxHitsToReport ( ) const

Returns the maximum number of protein hits to report.

This is a maximum value. There may be fewer than this number if minProbability is low (or > 1 and high), or if there are insufficient results.

  • If the ms_mascotresults::MSRES_MAXHITS_OVERRIDES_MINPROB flag is set, then the minProbability value is ignored when determining the number of hits to display.
  • With versions of parser before Mascot 2.2, this flag was not available so a value of 0 was passed as minProbability in the standard Mascot results reports. Also, if this flag is specified, a value of zero can be used for maxHitsToReport and the cutoff is then specified by minProbability.
  • If the flag ms_mascotresults::MSRES_GROUP_PROTEINS is set, then this value applies to the top level proteins – the similar and subset proteins are not included in the count.
Returns
The maximum number of protein hits to report.

◆ getMinNumSigUniqueSequences()

int getMinNumSigUniqueSequences ( ) const

Returns the value of the MinNumSigUniqueSequences parameter.

MinNumSigUniqueSequences is an optional flag for the peptide summary only. A protein hit must have at least as many significant unique sequences to be reported as a hit. A peptide sequence is significant if it has at least one peptide match above significance threshold, and it is unique if it appears in no other protein hit.

The default is 1. The value range is between 1 and 5, inclusive.

Returns
The value of MinNumSigUniqueSequences to use in the ms_peptidesummary constructor

◆ getMinPepLenInPeptideSummary()

int getMinPepLenInPeptideSummary ( ) const

Returns the minimum length of peptide match to use when generating a peptide summary report.

This is an optional flag for the peptide summary only. Any peptides shorter than this will be ignored when grouping proteins (see Grouping proteins together).

Returns
the minimum peptide length used to differentiate different proteins.

◆ getMinProbability()

double getMinProbability ( ) const

Returns the significance threshold.

minProbability is applied to both peptide matches and protein hits.

Peptide matches:

  • A peptide match (PSM) is significant if its expect value is below minProbability.
  • minProbability can be overriden by getTargetFDR().

Protein hits if ms_mascotresults::MSRES_MAXHITS_OVERRIDES_MINPROB is active:

Protein hits if MSRES_MAXHITS_OVERRIDES_MINPROB is not active:

  • A value of 0 indicates no cutoff - report getMaxHitsToReport() proteins, whatever the protein scores.
  • A value between 0 and 1 is used to calculate a protein score cut-off based on peptide match expect values. With standard protein scoring, 0.05 would discard all proteins with a score less the average score of a peptide with an expect value of 0.05. With MudPIT protein scoring, 0.05 would be the peptide expect value threshold used for calculating the protein scores, and only proteins with non-zero scores are reported.
  • A value greater than 1 indicates an absolute score cutoff for proteins, but this is not valid for an Integrated error tolerant search and is not permitted in the standard Mascot Search reports, so is not recommended.
  • If the flag ms_mascotresults::MSRES_GROUP_PROTEINS is set, then this value applies to the top level proteins - the similar and subset proteins are not 'cutoff' by this value.
  • The cutoff point is the lower of maxHitsToReport and this value. With versions of parser before Mascot 2.2, MSRES_MAXHITS_OVERRIDES_MINPROB was not available so AUTO in the standard Mascot results reports was implemented by setting this probability to a (user) defined value and setting getMaxHitsToReport() to a very large number.

Other points to note:

  • A value of less than 0 is not permitted and will be replaced with the default of 0.05.
  • In Mascot Parser 2.2 and earlier, a value between 0.1 and 1.0 was replaced with the default value of 0.05. In Mascot Parser 2.3, any value between 1e-18 and 1.0 is acceptable.
Returns
The value of the minProbability parameter used in the ms_peptidesummary and ms_proteinsummary constructors

◆ getSingleHit()

std::string getSingleHit ( ) const

Returns the optional single hit parameter used to get the results for a single hit quickly.

Should only be used for getting the results for a single protein quickly. See setSingleHit().

Returns
The single hit parameter value if available.

◆ getTargetFDR()

double getTargetFDR ( ) const

Returns the target FDR, if any.

Target FDR is only valid with ms_peptidesummary. Target FDR type is sequence (DS_COUNT_SEQUENCE) by default, which can be overriden using setTargetFDRType().

If target FDR is 0 (default), it is interpreted as "not set". ms_peptidesummary uses getMinProbability() as the significance threshold.

Target FDR is a value between 0 and 1. If the search is a target-decoy search, ms_peptidesummary tries to calibrate minProbability to a value that yields the target FDR (either PSM FDR or sequence FDR). If the search is not a target-decoy search, or ms_peptidesummary fails to reach the target, then getMinProbability() is used as the fallback value.

If the search is a target-decoy, integrated error tolerant, ms_peptidesummary has two independent significance thresholds, one for first pass matches and one for second pass matches. If target FDR is non-zero, ms_peptidesummary tries to calibrate both sets of matches to the same target FDR.

Mascot Server 2.8 and later may output a first_pass_threshold= value in the header section of the results file. This is the minProbability used at the end of the first pass of an integrated error tolerant search.

Mascot Server 2.8 and later accept a TARGET_FDR_PERCENT= search parameter, which is stored in the parameters section of the results file.

ms_mascotresfilebase::get_ms_mascotresults_params() follows this protocol:

Returns
target FDR, or 0 if not set.

◆ getTargetFDRType()

ms_mascotresults::DECOY_STATS_COUNT_TYPE getTargetFDRType ( ) const

Returns the target FDR type.

Target FDR type can be either PSM or sequence (default).

PSM FDR is calculated from the number of decoy PSMs and target PSMs.

Sequence FDR is calculated from the number of distinct decoy peptide sequences and distinct target peptide sequences, where each distinct peptide sequence has at least one PSM.

See getTargetFDR() for more details.

Returns
target FDR type.

◆ getUnigeneIndexFile()

std::string getUnigeneIndexFile ( ) const

Optional file path to a UniGene Index file.

This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.

Returns
The unigene index file parameter if available.

◆ isUsePeptideSummary()

bool isUsePeptideSummary ( ) const

Returns a hint as to whether a peptide or protein summary should be created.

The parameter is set when you call get_ms_mascotresults_params to populate the ms_mascotresults_params object. The value returned by this function is not used by any of the ms_peptidesummary or ms_proteinsummary constructors.

Returns
True if the ms_mascotresfilebase contains any MS/MS data, false if not.

◆ operator=()

ms_mascotresults_params & operator= ( const ms_mascotresults_params right)

Assignment operator.

Parameters
rightis the source to initialise from
Returns
reference to the current object

◆ setFlag()

void setFlag ( const ms_mascotresults::FLAGS  flag,
bool  enabled 
)

Toggles the value of an individual flag for use in the ms_mascotresults constructor.

Parameters
flagShould be one of the ms_mascotresults::FLAGS values.
enabledChoose true to set the flag and false to unset.

◆ setFlag2()

void setFlag2 ( const ms_peptidesummary::MSPEPSUM  flag,
bool  enabled 
)

Toggles the value of an individual flag used in the ms_peptidesummary constructor.

Parameters
flagShould be one of the ms_peptidesummary::MSPEPSUM values.
enabledChoose true to set the flag and false to unset.

◆ setFlags()

void setFlags ( const unsigned int  flags)

Sets the value of the flags parameter for use in the ms_mascotresults constructor.

Parameters
flagsShould be one or more of the ms_mascotresults::FLAGS values OR'ed together.

◆ setFlags2()

void setFlags2 ( const unsigned int  flags2)

Sets the value of the flags2 parameter used in the ms_peptidesummary constructor.

Flags2 is an optional parameter for the peptide summary only.

Parameters
flags2Should be one or more of the ms_peptidesummary::MSPEPSUM flags OR'ed together.

◆ setIgnoreIonsScoreBelow()

void setIgnoreIonsScoreBelow ( const double  ignoreIonsScoreBelow)

Sets the value of the ignoreIonsScoreBelow parameter.

Parameters
ignoreIonsScoreBelowis an optional flag for the peptide summary only. Any peptides with a score less than this will be ignored. If the value is greater than 0 and less than 1 then this is assumed to to be a probability rather than an absolute score; the reciprocal of this value is passed to ms_peptidesummary::getPeptideThreshold() to determine the score cutoff. If the value is -1, it is treated as equivalent to minProbability.

◆ setMaxHitsToReport()

void setMaxHitsToReport ( const int  maxHitsToReport)

Sets the maximum number of protein hits to report.

For details, see getMaxHitsToReport().

Parameters
maxHitsToReportis the new maximum value.

◆ setMinNumSigUniqueSequences()

void setMinNumSigUniqueSequences ( const int  n)

Sets the value of the MinNumSigUniqueSequences parameter.

For details, see getMinNumSigUniqueSequences().

Parameters
nNew value between 1 and 5, inclusive. If n is outside this range, it's set to 1.

◆ setMinPepLenInPeptideSummary()

void setMinPepLenInPeptideSummary ( const int  minPepLenInPeptideSummary)

Sets the minimum length of peptide match to use when generating a peptide summary report.

Parameters
minPepLenInPeptideSummaryis an optional flag for the peptide summary only. Any peptides shorter than this will be ignored when grouping proteins (see Grouping proteins together).

◆ setMinProbability()

void setMinProbability ( const double  minProbability)

Sets the significance threshold.

For details, see getMinProbability() and getTargetFDR().

Parameters
minProbabilityspecifies the significance threshold.

◆ setSingleHit()

void setSingleHit ( const char *  singleHit)

Sets the optional single hit parameter.

Parameters
singleHitshould only be used for getting the results for a single protein quickly. This is used for example by the the protein view report in Mascot, which just shows the matches for a single protein. See Using the singleHit parameter to return a single protein.
  • From programming languages other than C++, pass an empty string object to specify that all proteins should be used.
  • For Mascot 2.3 and later, a database index needs to be specified because the search may have been against multiple fasta files. If the database index is to be specified, the string must be of the form: "3:CH60_SHEON" and the ms_peptidesummary::MSPEPSUM_SINGLE_HIT_DBIDX must be specified in flags2. Othersise, at database index of 1 is assumed.

◆ setTargetFDR()

void setTargetFDR ( double  fdr)

Sets the target FDR.

Target FDR is a value between 0 and 1. Zero means "not set" and is the default. Target FDR type is set with setTargetFDRType().

See getTargetFDR() for details.

Parameters
fdrtarget FDR. If outside the valid range, target FDR is set to 0.

◆ setTargetFDRType()

void setTargetFDRType ( ms_mascotresults::DECOY_STATS_COUNT_TYPE  fdrType)

Sets the target FDR type.

Target FDR type can be either PSM or sequence (default).

See getTargetFDRType() for details.

Parameters
fdrTypenew type.

◆ setUnigeneIndexFile()

void setUnigeneIndexFile ( const char *  unigeneIndexFile)

Sets the optional file path to a UniGene Index file.

Parameters
unigeneIndexFileis an optional file path to a UniGene Index file. This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.
  • From programming languages other than C++, pass an empty string object to specify no UniGene index file.

◆ setUsePeptideSummary()

void setUsePeptideSummary ( const bool  usePeptideSummary)

Set the hint as to whether a peptide or protein summary should be created.

The parameter is set when you call get_ms_mascotresults_params to populate the ms_mascotresults_params object. The value returned by this function is not used by any of the ms_peptidesummary or ms_proteinsummary constructors.

Parameters
usePeptideSummaryPass in true if the result file contains MS/MS data, false if not

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