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_params & | operator= (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. | |
Class which provides constructor parameters for either ms_peptidesummary or ms_proteinsummary.
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.
flags | can be one or more of the ms_mascotresults::FLAGS values OR'ed together |
minProbability | specifies the significance threshold. See getMinProbability(). See also getTargetFDR(). |
maxHitsToReport | is a maximum value of protein hits to report. See getMaxHitsToReport(). |
unigeneIndexFile | is an optional file path to a UniGene Index file. This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.
|
ignoreIonsScoreBelow | is an optional flag for the peptide summary only. See getIgnoreIonsScoreBelow(). |
minPepLenInPepSummary | is an optional flag for the peptide summary only. Any peptides shorter than this will be ignored when grouping proteins (see Grouping proteins together). |
singleHit | should only be used for getting the results for a single protein quickly. See setSingleHit(). |
flags2 | should be one or more of the ms_peptidesummary::MSPEPSUM flags OR'd together |
ms_mascotresults_params | ( | const ms_mascotresults_params & | src | ) |
Copying constructor.
src | is the source to initialise from |
void copyFrom | ( | const ms_mascotresults_params * | right | ) |
Copies all data from another instance of the class.
right | is the source to initialise from |
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.
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.
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.
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.
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.
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).
double getMinProbability | ( | ) | const |
Returns the significance threshold.
minProbability is applied to both peptide matches and protein hits.
Peptide matches:
Protein hits if ms_mascotresults::MSRES_MAXHITS_OVERRIDES_MINPROB is active:
Protein hits if MSRES_MAXHITS_OVERRIDES_MINPROB is not active:
Other points to note:
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().
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:
first_pass_threshold=
. 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.
std::string getUnigeneIndexFile | ( | ) | const |
Optional file path to a UniGene Index file.
This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.
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.
ms_mascotresults_params & operator= | ( | const ms_mascotresults_params & | right | ) |
Assignment operator.
right | is the source to initialise from |
void setFlag | ( | const ms_mascotresults::FLAGS | flag, |
bool | enabled | ||
) |
Toggles the value of an individual flag for use in the ms_mascotresults constructor.
flag | Should be one of the ms_mascotresults::FLAGS values. |
enabled | Choose true to set the flag and false to unset. |
void setFlag2 | ( | const ms_peptidesummary::MSPEPSUM | flag, |
bool | enabled | ||
) |
Toggles the value of an individual flag used in the ms_peptidesummary constructor.
flag | Should be one of the ms_peptidesummary::MSPEPSUM values. |
enabled | Choose true to set the flag and false to unset. |
void setFlags | ( | const unsigned int | flags | ) |
Sets the value of the flags parameter for use in the ms_mascotresults constructor.
flags | Should be one or more of the ms_mascotresults::FLAGS values OR'ed together. |
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.
flags2 | Should be one or more of the ms_peptidesummary::MSPEPSUM flags OR'ed together. |
void setIgnoreIonsScoreBelow | ( | const double | ignoreIonsScoreBelow | ) |
Sets the value of the ignoreIonsScoreBelow parameter.
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. If the value is -1, it is treated as equivalent to minProbability. |
void setMaxHitsToReport | ( | const int | maxHitsToReport | ) |
Sets the maximum number of protein hits to report.
For details, see getMaxHitsToReport().
maxHitsToReport | is the new maximum value. |
void setMinNumSigUniqueSequences | ( | const int | n | ) |
Sets the value of the MinNumSigUniqueSequences parameter.
For details, see getMinNumSigUniqueSequences().
n | New value between 1 and 5, inclusive. If n is outside this range, it's set to 1. |
void setMinPepLenInPeptideSummary | ( | const int | minPepLenInPeptideSummary | ) |
Sets the minimum length of peptide match to use when generating a peptide summary report.
minPepLenInPeptideSummary | is an optional flag for the peptide summary only. Any peptides shorter than this will be ignored when grouping proteins (see Grouping proteins together). |
void setMinProbability | ( | const double | minProbability | ) |
Sets the significance threshold.
For details, see getMinProbability() and getTargetFDR().
minProbability | specifies the significance threshold. |
void setSingleHit | ( | const char * | singleHit | ) |
Sets the optional single hit parameter.
singleHit | should 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.
|
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.
fdr | target FDR. If outside the valid range, target FDR is set to 0. |
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.
fdrType | new type. |
void setUnigeneIndexFile | ( | const char * | unigeneIndexFile | ) |
Sets the optional file path to a UniGene Index file.
unigeneIndexFile | is an optional file path to a UniGene Index file. This only makes sense if ms_mascotresults::MSRES_GROUP_PROTEINS is set.
|
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.
usePeptideSummary | Pass in true if the result file contains MS/MS data, false if not |