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

This class encapsulates the search parameters in the Mascot results file. More...

#include <ms_searchparams.hpp>

Public Types

enum  MULTI_SITE_MODS {
  MSM_NOT_PERMITTED = 0x0000 ,
  MSM_EXCLUSIVE_PLUS_VARIABLE = 0x0001
}
 Possible values for MULTI_SITE_MODS. More...
 

Public Member Functions

 ms_searchparams (const ms_mascotresfilebase &resfile)
 Either explicitily create an object using this constructor or call ms_mascotresfilebase::params().
 
 ~ms_searchparams ()
 Should never need to call this destructor directly.
 
std::string getACCESSION ()
 Returns a comma separated list of accession strings to which the search was limited.
 
std::string getAllUSERParams () const
 Returns all the 'user defined' parameters.
 
double getCarbonMass () const
 Returns the mass of carbon as specified in the Unimod file.
 
std::string getCHARGE ()
 Returns the charge state of the peptide masses entered.
 
std::string getCLE ()
 Returns the name of the enzyme used for the search.
 
std::string getCOM ()
 This is the comment or "Search title" entered by the user in the search form.
 
std::string getCROSSLINKING () const
 Returns the name of the crosslinking method used.
 
double getCTermMass ()
 Returns the C terminus mass.
 
std::string getDATAURL ()
 Returns the URL of the uploaded file (if any).
 
std::string getDB (int idx=1)
 Returns one of the database names used for the search.
 
int getDECOY () const
 Returns a value showing if a decoy database has been searched.
 
double getElectronMass () const
 Returns the mass of an electron as specified in the Unimod file.
 
bool getERRORTOLERANT ()
 Returns true for an error tolerant search.
 
std::string getErrTolParentFilename ()
 Returns the filename of the 'parent' search for an old-style (manual) error tolerant search.
 
std::string getFILENAME ()
 Returns the name of the uploaded file (if any).
 
double getFixedModsDelta (int num)
 Returns the delta mass of a fixed modification.
 
std::string getFixedModsName (int num) const
 
double getFixedModsNeutralLoss (int num)
 Returns the neutral loss value of the specified fixed modification.
 
std::string getFixedModsResidues (int num) const
 Returns the residues modified by the specified fixed modification.
 
std::string getFORMAT ()
 Returns the file format type selected by the user.
 
std::string getFORMVER ()
 Returns the version of the form used to submit the search.
 
double getHydrogenMass () const
 Returns the mass of nitrogen as specified in the Unimod file.
 
bool getICAT ()
 Returns true if the user selected the ICAT button on the search form.
 
std::string getINSTRUMENT ()
 Returns the instrument name that the user selected.
 
std::string getINTERMEDIATE ()
 For a repeat search, it may be necessary to know the "parent" search.
 
std::string getIT_MODS ()
 Returns a comma separated list of the variable modifications used in a search.
 
double getITOL ()
 Returns the tolerance for msms ions.
 
std::string getITOLU ()
 Returns the units that the ions tolerance is specified in.
 
int getLIBRARY_SEARCH () const
 Returns a value showing whether a spectral library is allowed as a search parameter.
 
double getLibraryModDelta (int num) const
 Returns the delta mass of the specified spectral library modification.
 
std::string getLibraryModName (int num) const
 Returns the name of the specified spectral library modification.
 
std::string getLICENSE ()
 Returns the Mascot license string.
 
std::string getMASS ()
 Returns whether monoisotopic or average masses have been specified.
 
MASS_TYPE getMassType ()
 Returns either MASS_TYPE_MONO or MASS_TYPE_AVE.
 
double getMaxInternalMass ()
 Returns the maximum mass to be considered for internal fragments.
 
double getMinInternalMass ()
 Returns the minimum mass to be considered for internal fragments.
 
std::vector< std::string > getML_ADAPTER_PARAM () const
 Returns a list of strings defined as default ML adapter parameters.
 
std::string getMODS ()
 Returns a comma separated list of the fixed modifications used in a search.
 
unsigned int getMULTI_SITE_MODS () const
 Returns a flag showing what MULTI_SITE_MODS options were selected.
 
double getNitrogenMass () const
 Returns the mass of nitrogen as specified in the Unimod file.
 
double getNTermMass ()
 Returns the N terminus mass.
 
int getNumberOfDatabases ()
 Returns total number of databases used for the search.
 
int getNumberOfLibraryMods () const
 Return the number of modifications in the spectral libraries searched.
 
bool getOVERVIEW ()
 Returns true if the user selected the option to show the overview table.
 
double getOxygenMass () const
 Returns the mass of oxygen as specified in the Unimod file.
 
int getPEP_ISOTOPE_ERROR () const
 Returns a value showing how a peak detection error is handled.
 
int getPERCOLATE () const
 Returns a value showing if Percolator is selected as a search parameter.
 
int getPFA ()
 Returns the number of missed cleavage points allowed for in a search.
 
double getPRECURSOR ()
 Returns the precursor mass for an MS/MS query.
 
std::string getQUANTITATION () const
 Returns the name of the quantitation method used.
 
std::string getQUE ()
 Currently returns an empty string.
 
int getREPORT ()
 Returns the number of results to show in the report.
 
std::string getREPTYPE ()
 Returns the type of report requested by the user.
 
double getResidueMass (char residue)
 Returns the mass of the specified residue (must be uppercase letter A-Z).
 
std::string getRULES ()
 Returns as a comma separated list, the rules / ions series used for a search.
 
std::string getSEARCH ()
 Returns the type of search – this will be PMF, SQ, MIS.
 
int getSEG ()
 Returns the segment or protein mass.
 
int getSUBCLUSTER ()
 Returns the sub cluster number.
 
double getTARGET_FDR_PERCENT () const
 Returns the target FDR specified as a search parameter.
 
std::string getTAXONOMY ()
 Returns the name of the taxonomy selection.
 
double getTOL ()
 Returns the peptide tolerance for the search.
 
std::string getTOLU ()
 Returns the peptide tolerance units for the search.
 
std::string getUSEREMAIL ()
 Returns the user's email address (if any) as entered in the search form.
 
std::string getUSERField (int num)
 Returns the user fields USER00, USER01, USER02 ... USER12.
 
int getUSERID ()
 Returns the user's USERID.
 
std::string getUSERNAME ()
 Returns the user name (if any) as entered in the search form.
 
double getVarModsDelta (int num)
 Returns the delta mass for a variable modification.
 
std::string getVarModsName (int num) const
 
double getVarModsNeutralLoss (int num)
 Returns the first neutral loss value of the specified variable modification.
 
std::vector< double > getVarModsNeutralLosses (int num) const
 Returns all the neutral loss values of the specified variable modification.
 
std::vector< double > getVarModsPepNeutralLoss (int num)
 Returns the peptide neutral loss value(s) of the specified variable modification.
 
std::vector< double > getVarModsReqPepNeutralLoss (int num)
 Returns the required peptide neutral loss value(s) of the specified variable modification.
 
bool hasINTERNALS () const
 Returns true if minimum or maximum internal fragment mass was specified.
 

Detailed Description

This class encapsulates the search parameters in the Mascot results file.

Although all these parameters could be obtained using the lower level functions in the ms_mascotresfilebase class, it is generally more convenient to use this object.

Examples
resfile_params.cpp.

Member Enumeration Documentation

◆ MULTI_SITE_MODS

Possible values for MULTI_SITE_MODS.

See Using enumerated values and static const ints in Perl, Java, Python and C#. The return value from getMULTI_SITE_MODS() is one or more of these values OR'd together.

Currently only has one permitted value, but could be extended in future.

Enumerator
MSM_NOT_PERMITTED 

The default value. Only one variable or exclusive mod per residue.

MSM_EXCLUSIVE_PLUS_VARIABLE 

An exclusive mod and one or more variable mod may be specified for the same residue.

Constructor & Destructor Documentation

◆ ms_searchparams()

ms_searchparams ( const ms_mascotresfilebase resfile)

Either explicitily create an object using this constructor or call ms_mascotresfilebase::params().

Search parameters can be obtained either by creating a search params object or by using the object created when the results file is created:

C++
   ms_mascotresfile_msr resfile(filename);

   // Option 1:
   ms_searchparams *params = new ms_searchparams(resfile);
   // Option 2:
   ms_searchparams params = resfile.params();
Perl
   my $resfile = msparser::ms_mascotresfile_msr->new($filename);

   # Option 1:
   my $params = msparser::ms_searchparams->new($resfile);
   # Option 2:
   my $params = $resfile->params();
Java
   ms_mascotresfile_msr resfile = new ms_mascotresfile_msr(filename);

   // Option 1:
   ms_searchparams params = new ms_searchparams(resfile);
   // Option 2:
   ms_searchparams params = resfile.params();
Python
   resfile = msparser.ms_mascotresfile_msr(filename)

   # Option 1:
   params = msparser.ms_searchparams(resfile)
   # Option 2:
   params = resfile.params()

See Maintaining object references: two rules of thumb.

Parameters
resfileresult file object

Member Function Documentation

◆ getACCESSION()

std::string getACCESSION ( )

Returns a comma separated list of accession strings to which the search was limited.

The search space may be limited to the named accessions by specifying ACCESSION= as a search parameter.

For an old-style (manual) error tolerant search, the user typically specifies a list of accession "numbers" to be searched. This function returns a comma separated list of accession strings – each will have double quotes around it. The string is obtained from the ACCESSION= line in the parameters section of the results file.

Returns
comma separated list of accession strings

◆ getAllUSERParams()

std::string getAllUSERParams ( ) const

Returns all the 'user defined' parameters.

Returns a string of all the entries in the 'parameters' section or search__parameters table that have a leading underscore. Each item is separated by a newline character. Note that if there are two user parameters with the same key (differing only by case), then the second one of these will be discarded.

Returns
all the user defined parameters

◆ getCarbonMass()

double getCarbonMass ( ) const

Returns the mass of carbon as specified in the Unimod file.

This is obtained from the carbon= line in the masses section or search__symbol_masses table of the results file.

The mass will also depend on whether monoisotopic or average masses were selected by the user. See getMASS().

These values originate from the Unimod file.

Returns
mass of carbon.

◆ getCHARGE()

std::string getCHARGE ( )

Returns the charge state of the peptide masses entered.

This is obtained from the CHARGE= line in the parameters section or search__parameters table of the results file. Use ms_peptide::getCharge to return the actual charge state that was used for a peptide match.

This is the default charge state that was used when running the search. It can be overridden by charge states in an uploaded file; see ms_inputquery::getCharge().

If the search was submitted from the standard Mascot search form, then it will be one of the following strings:

  • '8-'
  • '7-'
  • '6-'
  • '5-'
  • '4-'
  • '3-'
  • '2- and 3-'
  • '2-'
  • '1-, 2- and 3-'
  • '1-'
  • 'Mr'
  • '1+'
  • '1+, 2+ and 3+'
  • '2+'
  • '2+ and 3+'
  • '3+'
  • '4+'
  • '5+'
  • '6+'
  • '7+'
  • '8+'

The charge can also be any comma separated list of charge states.

See also
https://www.matrixscience.com/help/search_field_help.html#TWO
Returns
The default charge(s) as a string.

◆ getCLE()

std::string getCLE ( )

Returns the name of the enzyme used for the search.

This is obtained from the CLE= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#CLE
Returns
name of the enzyme used for the search

◆ getCOM()

std::string getCOM ( )

This is the comment or "Search title" entered by the user in the search form.

This is obtained from the COM= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#COM
Returns
comment or "Search title" entered by the user in the search form

◆ getCROSSLINKING()

std::string getCROSSLINKING ( ) const

Returns the name of the crosslinking method used.

Available in Mascot 2.7 and later.

See also
https://www.matrixscience.com/help/search_field_help.html#CROSSLINKING
Returns
If no crosslinking is specified, an empty string or "None". Otherwise return the name of the crosslinking method from the CROSSLINKING= value in the parameters section or search__parameters table of the results file.

◆ getCTermMass()

double getCTermMass ( )

Returns the C terminus mass.

This is obtained from the C_term= line in the masses section or search__symbol_masses table of the results file.

The mass value will depend on whether monoisotopic or average masses were selected by the user (see getMASS()). Additionally, any fixed (but not variable) modifications are included in this mass. If no C terminus mods are specified, this value should be the same as getOxygenMass() + getHydrogenMass().

These values originate from the Unimod file.

Returns
C terminus mass

◆ getDATAURL()

std::string getDATAURL ( )

Returns the URL of the uploaded file (if any).

This is obtained from the DATAURL= line in the parameters section or search__parameters table of the results file.

Returns
URL of the uploaded file

◆ getDB()

std::string getDB ( int  idx = 1)

Returns one of the database names used for the search.

This is normally obtained from the DB= line in the parameters section or search__parameters table of the results file.

It is not possible to find the database file name and path directly from its name. The get the path to the database file used in the search, use ms_mascotresfilebase::getFastaPath(), or you will need to manually parse the Databases section of mascot.dat and search for the line starting with the name returned by getDB(). Replace the last part of the path with the return value from the ms_mascotresfilebase::getFastaVer() function to complete the file name.

Mascot 2.6 and later support spectral libraries. Each spectral library must have a reference database into which found peptide sequences are mapped at the end of the search. The "effective" reference database could be one of the protein sequence databases searched, or it could be a separate database used only for lookup purposes. You can find the database number of the reference database with ms_mascotresfilebase::getReferenceDatabaseNumberOfSL(). If this is larger than getNumberOfDatabases(), the database name is obtained from the library_reference_DB line in the header section of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#DB
Parameters
idxindex of the database from 1 to getNumberOfDatabases() for databases or libraries searched, or an index returned by ms_mascotresfilebase::getReferenceDatabaseNumberOfSL().
Returns
one of the database names used for the search

◆ getDECOY()

int getDECOY ( ) const

Returns a value showing if a decoy database has been searched.

Available in Mascot 2.2 and later.

See also
https://www.matrixscience.com/help/decoy_help.html#AUTO

The value is obtained from the DECOY= line in the parameters section or search__parameters table of the results file. If there is no such line, this method returns -1. Otherwise, the method returns 0 if DECOY is off and 1 if DECOY is on.

Returns
-1, 0 or 1.

◆ getElectronMass()

double getElectronMass ( ) const

Returns the mass of an electron as specified in the Unimod file.

This is obtained from the Electron= line in the masses section or search__symbol_masses table of the results file.

Results files produced by Mascot versions prior to 1.9 do not have this entry. For those files, the returned value will be zero.

These values originate from the Unimod file.

Returns
mass of an electron.

◆ getERRORTOLERANT()

bool getERRORTOLERANT ( )

Returns true for an error tolerant search.

This is obtained from the ERRORTOLERANT= line in the parameters section or search__parameters table of the results file.

If getErrTolParentFilename() is empty and getERRORTOLERANT() is true, then this is an integrated error tolerant search. This is the preferred mode in Mascot Server 2.2 and later.

If getErrTolParentFilename() is not empty and getERRORTOLERANT() is true, then is this an old-style (manual) error tolerant search. Use getACCESSION() to get the list of accession numbers that were used in the error tolerant pass.

See also
https://www.matrixscience.com/help/error_tolerant_help.html
Returns
true if the search is error tolerant, false otherwise

◆ getErrTolParentFilename()

std::string getErrTolParentFilename ( )

Returns the filename of the 'parent' search for an old-style (manual) error tolerant search.

If getErrTolParentFilename() is empty and getERRORTOLERANT() is true, then this is an integrated error tolerant search. This is the preferred mode in Mascot Server 2.2 and later.

If getErrTolParentFilename() is not empty and getERRORTOLERANT() is true, then is this an old-style (manual) error tolerant search. Use getACCESSION() to get the list of accession numbers that were used in the error tolerant pass.

A manual error tolerant search is normally performed as a repeat search. The filename for the 'parent' non error tolerant search is saved in the parameters section as _errortolerantsearchparent, and can be accessed using this function.

It is not possible to use getINTERMEDIATE(), because a manual error tolerant search can be performed as a repeat search from another manual error tolerant search.

See Error tolerant searches for further details.

Returns
relative path to the parent error tolerant file

◆ getFILENAME()

std::string getFILENAME ( )

Returns the name of the uploaded file (if any).

This is obtained from the FILE= line in the parameters section or search__parameters table of the results file.

Returns
name of the uploaded file

◆ getFixedModsDelta()

double getFixedModsDelta ( int  num)

Returns the delta mass of a fixed modification.

In dat28 format, this value is obtained from the FixedMod[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__fixed_mods table.

Any number of fixed modifications can be applied during a search as long as multiple modifications don't affect the same residue/terminus. Information about fixed modifications can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about fixed modifications.

Parameters
numis the modification number. This number is not referenced elsewhere in the results file.
Returns
The delta, or a value of zero if no delta is found.

◆ getFixedModsName()

std::string getFixedModsName ( int  num) const

In dat28 format, this value is obtained from the FixedMod[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__fixed_mods table.

Any number of fixed modifications can be applied during a search as long as multiple modifications don't affect the same residue/terminus. Information about fixed modifications can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about fixed modifications.

Parameters
numis the modification number. This number is not referenced elsewhere in the results file.
Returns
The modification name, or an empty string if no name is found.

◆ getFixedModsNeutralLoss()

double getFixedModsNeutralLoss ( int  num)

Returns the neutral loss value of the specified fixed modification.

In dat28 format, this value is obtained from the FixedModNeutralLoss[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__fixed_mods table.

Any number of fixed modifications can be applied during a search as long as multiple modifications don't affect the same residue/terminus. Information about fixed modifications can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about fixed modifications.

Parameters
numis the modification number. This number is not referenced elsewhere in the results file.
Returns
The neutral loss delta, or zero if no neutral loss is found. Only a single neutral loss is permitted for a fixed modifcation.

◆ getFixedModsResidues()

std::string getFixedModsResidues ( int  num) const

Returns the residues modified by the specified fixed modification.

In dat28 format, this value is obtained from the FixedModResidues[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__fixed_mods table.

Any number of fixed modifications can be applied during a search as long as multiple modifications don't affect the same residue/terminus. Information about fixed modifications can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about fixed modifications.

Parameters
numis the modification number. This number is not referenced elsewhere in the results file.
Returns
The string representing which residues/terminus are modified. It will be of the form [A-Z]|C_term|N_term. Multiple residues will be listed as, for example, STY.

◆ getFORMAT()

std::string getFORMAT ( )

Returns the file format type selected by the user.

This is obtained from the FORMAT= line in the parameters section or search__parameters table of the results file.

Currently supported formats:
  • Mascot generic
  • Sequest (.DTA)
  • Finnigan (.ASC)
  • Micromass (.PKL)
  • PerSeptive (.PKS)
  • Sciex API III
  • Bruker (.XML)
  • mzData (.XML)
  • mzML (.mzML)
See also
https://www.matrixscience.com/help/data_file_help.html
Returns
file format type selected by the user

◆ getFORMVER()

std::string getFORMVER ( )

Returns the version of the form used to submit the search.

This is obtained from the FORMVER= line in the parameters section or search__parameters table of the results file.

This is currently 1.01.

Returns
version of the form used to submit the search

◆ getHydrogenMass()

double getHydrogenMass ( ) const

Returns the mass of nitrogen as specified in the Unimod file.

This is obtained from the hydrogen= line in the masses section or search__symbol_masses table of the results file.

The mass will also depend on whether monoisotopic or average masses were selected by the user. See getMASS().

These values originate from the Unimod file.

Returns
mass of nitrogen.

◆ getICAT()

bool getICAT ( )

Returns true if the user selected the ICAT button on the search form.

This is obtained from the ICAT= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#ICAT
Returns
If the value in the results file is (case insensitive) ON or 1, this will return true.

◆ getINSTRUMENT()

std::string getINSTRUMENT ( )

Returns the instrument name that the user selected.

This is obtained from the INSTRUMENT= line in the parameters section or search__parameters table of the results file.

This string will be NULL for versions of Mascot prior to 1.8.

See also getRULES(). It is preferable to use the rules rather than this name to determine which ions series were searched since the user can change the definition of the name.

See also
https://www.matrixscience.com/help/search_field_help.html#INSTRUMENT
Returns
instrument name that the user selected

◆ getINTERMEDIATE()

std::string getINTERMEDIATE ( )

For a repeat search, it may be necessary to know the "parent" search.

This is obtained from the INTERMEDIATE= line in the parameters section or search__parameters table of the results file.

This function returns the file name for the results file of the 'parent' search.

Returns
file name of the parent search result file

◆ getIT_MODS()

std::string getIT_MODS ( )

Returns a comma separated list of the variable modifications used in a search.

This is obtained from the IT_MODS= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#MODS
Returns
comma separated list of the variable modifications used in a search

◆ getITOL()

double getITOL ( )

Returns the tolerance for msms ions.

This is obtained from the ITOL= line in the parameters section or search__parameters table of the results file.

See also
getITOLU()
https://www.matrixscience.com/help/search_field_help.html#ITOL
Returns
tolerance for MS/MS ions

◆ getITOLU()

std::string getITOLU ( )

Returns the units that the ions tolerance is specified in.

This is obtained from the ITOLU= line in the parameters section or search__parameters table of the results file.

The units will be one of:

mmu
absolute milli-mass units, i.e. units of .001 Da
Da
absolute units of Da
ppm
fraction expressed as parts per million
See also
getITOL()
https://www.matrixscience.com/help/search_field_help.html#ITOL
Returns
unit that the ions tolerance is specified in

◆ getLIBRARY_SEARCH()

int getLIBRARY_SEARCH ( ) const

Returns a value showing whether a spectral library is allowed as a search parameter.

Available in Mascot 2.6 and later.

See also
https://www.matrixscience.com/help/spectral_library.html

The value is obtained from the LIBRARY_SEARCH= line in the parameters section or search__parameters table of the results file. If there is no such line, this method returns -1. Otherwise, the method returns 0 if LIBRARY_SEARCH is off and 1 if LIBRARY_SEARCH is on.

If LIBRARY_SEARCH is on, it means one or more DB parameter is allowed to be a spectral library. To check whether any spectral libraries were actually searched, either inspect the database types (ms_mascotresfilebase::getDatabaseType()) or check ms_mascotresfilebase::anySpectralLibraryMatches().

Returns
-1, 0 or 1.

◆ getLibraryModDelta()

double getLibraryModDelta ( int  num) const

Returns the delta mass of the specified spectral library modification.

In dat28 format, library modifications are stored in the spectral_library section of the results file. In MSR format, in search__spectral_library_mods table.

These are all the modifications contained in the spectral libraries selected for searching. Individual spectral library matches, if they have modifications, refer to modification index numbers in this list.

The modification only has a delta mass if its name was in the Unimod configuration file at the time of the search. Otherwise only its name is recorded in the spectral_library section. It is better to look up the modification by name from the Unimod configuration file than rely on the delta mass being present.

Note that the list of modifications in actual matches in the search is different. See ms_peptidesummary::getNumDiscoveredLibraryMods().

Parameters
numis library modification index. See ms_peptidesummary::getLibraryModString(). The index should be between 1 and getNumberOfLibraryMods().
Returns
modification delta mass, or 0.0 if not available.

◆ getLibraryModName()

std::string getLibraryModName ( int  num) const

Returns the name of the specified spectral library modification.

In dat28 format, library modifications are stored in the spectral_library section of the results file. In MSR format, in search__spectral_library_mods table.

These are all the modifications contained in the spectral libraries selected for searching. Individual spectral library matches, if they have modifications, refer to modification index numbers in this list.

Note that the list of modifications in actual matches in the search is different. See ms_peptidesummary::getNumDiscoveredLibraryMods().

Parameters
numis library modification index. See ms_peptidesummary::getLibraryModString(). The index should be between 1 and getNumberOfLibraryMods().
Returns
modification name. The name may be a Unimod name, or it may be a free-text string; this depends on how the library was constructed.

◆ getLICENSE()

std::string getLICENSE ( )

Returns the Mascot license string.

This string is the one in the license file, and is printed out during a Mascot search. This is obtained from the LICENSE= line in the parameters section or search__parameters table of the results file.

Returns
Mascot license string

◆ getMASS()

std::string getMASS ( )

Returns whether monoisotopic or average masses have been specified.

This is obtained from the MASS= line in the parameters section or search__parameters table of the results file. The returned text will be "Monoisotopic" or "Average" – even if the text in the results file is, for example, all upper case.

See also
getMassType() which may be a more useful function.
https://www.matrixscience.com/help/search_field_help.html#MASS
Returns
"Monoisotopic" or "Average"

◆ getMassType()

MASS_TYPE getMassType ( )

Returns either MASS_TYPE_MONO or MASS_TYPE_AVE.

The value is obtained from the MASS= line in the parameters section or search__parameters table of the results file.

See also
getMASS()
Returns
MASS_TYPE_MONO or MASS_TYPE_AVE

◆ getMaxInternalMass()

double getMaxInternalMass ( )

Returns the maximum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

The value specified for the instrument is saved in the parameters section or search__parameters table of the results file as INTERNALS=min,max. If there is no INTERNALS= line, the default value of 700.0 is returned.

A different instrument can be specified for each spectrum, in which case the values can be found using ms_inputquery::getMinInternalMass and ms_inputquery::getMaxInternalMass

See also
getRULES(), getINSTRUMENT()
Returns
The maximum internal mass considered in this search.

◆ getMinInternalMass()

double getMinInternalMass ( )

Returns the minimum mass to be considered for internal fragments.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

The value specified for the instrument is saved in the parameters section or search__parameters table of the results file as INTERNALS=min,max. If there is no INTERNALS= line, the default value of 0 is returned.

A different instrument can be specified for each spectrum, in which case the values can be found using ms_inputquery::getMinInternalMass and ms_inputquery::getMaxInternalMass.

See also
getRULES() getINSTRUMENT()
Returns
The minimum internal mass considered in this search.

◆ getML_ADAPTER_PARAM()

std::vector< std::string > getML_ADAPTER_PARAM ( ) const

Returns a list of strings defined as default ML adapter parameters.

Available in Mascot 3.0 and later.

See also
https://www.matrixscience.com/help/search_field_help.html#PERCOLATE

A user can submit default ML adapter parameters as ML_ADAPTER_PARAM. This is a list of key-value parameters joined by equals sign and separated by commas. Examples of valid values:

Nothing defined:

ML_ADAPTER_PARAM=

One parameter:

ML_ADAPTER_PARAM="MS2Rescore.ms2pip_model=HCD2021"

Two parameters:

ML_ADAPTER_PARAM="MS2Rescore.ms2pip_model=HCD2021","MS2Rescore.deeplc_model=full_hc_hela_hf_psms_aligned"

This method splits the values on comma, then returns the key-value pairs as strings. The vector is suitable as input to ms_mascotresfilebase::setPercolatorFeatures().

The values available at search submission time depend on the adapters defined in mascot/config/ML_adapters.toml.

Returns
a vector of strings, or empty vector if no parameter is defined.

◆ getMODS()

std::string getMODS ( )

Returns a comma separated list of the fixed modifications used in a search.

This is obtained from the MODS= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#MODS
Returns
comma separated list of the fixed modifications used in a search

◆ getMULTI_SITE_MODS()

unsigned int getMULTI_SITE_MODS ( ) const

Returns a flag showing what MULTI_SITE_MODS options were selected.

Available in Mascot 2.4 and later.

See also
ms_peptide::getSummedModsStr
Multiple modifications for the same site
Returns
the value of MULTI_SITE_MODS in the paramters section or search__parameters table of the results file. This will be one or more ms_searchparams::MULTI_SITE_MODS values OR'ed together. If there is no MULTI_SITE_MODS in the results file, then ms_searchparams::MSM_NOT_PERMITTED will be returned.

◆ getNitrogenMass()

double getNitrogenMass ( ) const

Returns the mass of nitrogen as specified in the Unimod file.

This is obtained from the nitrogen= line in the masses section or search__symbol_masses table of the results file.

The mass will also depend on whether monoisotopic or average masses were selected by the user. See getMASS().

These values originate from the Unimod file.

Returns
mass of nitrogen.

◆ getNTermMass()

double getNTermMass ( )

Returns the N terminus mass.

This is obtained from the N_term= line in the masses section or search__symbol_masses table of the results file.

The mass value will depend on whether monoisotopic or average masses were selected by the user (see getMASS()). Additionally, any fixed (but not variable) modifications are included in this mass. If no N terminus mods are specified, this value should be the same as getHydrogenMass().

These values originate from the Unimod file.

Returns
N terminus mass

◆ getNumberOfDatabases()

int getNumberOfDatabases ( )

Returns total number of databases used for the search.

This method is used in conjunction with getDB() to find out the total number of databases used in the search.

Mascot 2.6 and later support spectral libraries. The total number of databases searched includes the protein sequence and nucleic acid databases and spectral libraries, but does not include any reference databases of spectral libraries.

Returns
The number of databases and libraries used in the search.

◆ getNumberOfLibraryMods()

int getNumberOfLibraryMods ( ) const

Return the number of modifications in the spectral libraries searched.

In dat28 format, library modifications are stored in the spectral_library section of the results file. In MSR format, in search__spectral_library_mods table.

These are all the modifications contained in the spectral libraries selected for searching. Individual spectral library matches, if they have modifications, refer to modification index numbers in this list.

Note that the list of modifications in actual matches in the search is different. See ms_peptidesummary::getNumDiscoveredLibraryMods().

Returns
the number of entries in the spectral_library section, which equals the last non-empty index X in the ModX= lines.

◆ getOVERVIEW()

bool getOVERVIEW ( )

Returns true if the user selected the option to show the overview table.

This is obtained from the OVERVIEW= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#OVERVIEW
Returns
True if the value is (case insensitive) ON or 1.

◆ getOxygenMass()

double getOxygenMass ( ) const

Returns the mass of oxygen as specified in the Unimod file.

This is obtained from the oxygen= line in the masses section or search__symbol_masses table of the results file.

The mass will also depend on whether monoisotopic or average masses were selected by the user. See getMASS().

These values originate from the Unimod file.

Returns
mass of oxygen.

◆ getPEP_ISOTOPE_ERROR()

int getPEP_ISOTOPE_ERROR ( ) const

Returns a value showing how a peak detection error is handled.

Available in Mascot 2.2 and later.

See also
https://www.matrixscience.com/help/search_field_help.html#PEP_ISOTOPE_ERROR

Normal test for a peptide match is

exp > calc-tol  && exp < calc+tol 

If PEP_ISOTOPE_ERROR >= 1, also test for

exp > calc+1.003+tol && exp < calc+1.003-tol 

If PEP_ISOTOPE_ERROR >= 2, also test for

exp > calc+2.007+tol && exp < calc+2.007-tol 
Returns
The value of PEP_ISOTOPE_ERROR in the parameters section or search__parameters table of the results file. If there is no PEP_ISOTOPE_ERROR value in the results file, then -1 is returned.

◆ getPERCOLATE()

int getPERCOLATE ( ) const

Returns a value showing if Percolator is selected as a search parameter.

Available in Mascot 3.0 and later.

See also
https://www.matrixscience.com/help/search_field_help.html#PERCOLATE

The value is obtained from the PERCOLATE= line in the parameters section or search__parameters table of the results file. If there is no such line, this method returns -1. Otherwise, the method returns 0 if PERCOLATE is off and 1 if PERCOLATE is on.

Returns
-1, 0 or 1.

◆ getPFA()

int getPFA ( )

Returns the number of missed cleavage points allowed for in a search.

This is obtained from the PFA= line in the parameters section or search__parameters table of the results file

See also
https://www.matrixscience.com/help/search_field_help.html#PFA
Returns
number of missed cleavage points allowed for in a search

◆ getPRECURSOR()

double getPRECURSOR ( )

Returns the precursor mass for an MS/MS query.

This is obtained from the PRECURSOR= line in the parameters section or search__parameters table of the results file.

Three data file formats, SCIEX API III and PerSeptive (.PKS) and Bruker (.XML), do not include m/z information for the precursor peptide. For these formats only, the Precursor field is used to specify the m/z value of the parent peptide.

See also
https://www.matrixscience.com/help/search_field_help.html#PRECURSOR
Returns
precursor mass for an MS-MS query

◆ getQUANTITATION()

std::string getQUANTITATION ( ) const

Returns the name of the quantitation method used.

Available in Mascot 2.2 and later.

See also
https://www.matrixscience.com/help/search_field_help.html#QUANTITATION
Returns
If no quantitation is specified, an empty string or "None". Otherwise return the name of the quantitation method from the QUANTITATION= value in the parameters section or search__parameters table of the results file.

◆ getQUE()

std::string getQUE ( )

Currently returns an empty string.

This is obtained from the QUE= line in the parameters section or search__parameters table of the results file.

Returns
QUE

◆ getREPORT()

int getREPORT ( )

Returns the number of results to show in the report.

This is obtained from the REPORT= line in the parameters section or search__parameters table of the results file. For 'AUTO' a value of 0 is returned.

See also
https://www.matrixscience.com/help/search_field_help.html#REPORT
Returns
number of results to show in the report

◆ getREPTYPE()

std::string getREPTYPE ( )

Returns the type of report requested by the user.

This is obtained from the REPTYPE= line in the parameters section or search__parameters table of the results file

This will be one of:

  • concise
  • peptide
  • protein
See also
https://www.matrixscience.com/help/results_help.html
Returns
type of report requested by the user

◆ getResidueMass()

double getResidueMass ( char  residue)

Returns the mass of the specified residue (must be uppercase letter A-Z).

This is obtained from the A=,B= etc. line in the masses section or search__symbol_masses table of the results file.

The mass value will depend on whether monoisotopic or average masses were selected by the user (see getMASS()). Additionally, any fixed (but not variable) modifications are included in this mass.

Parameters
residueuppercase letter A-Z
Returns
mass of the specified residue

◆ getRULES()

std::string getRULES ( )

Returns as a comma separated list, the rules / ions series used for a search.

This is obtained from the RULES= line in the parameters section or search__parameters table of the results file.

The numbers in the comma separated list have the following meanings:

   1 = singly charged
   2 = doubly charged if precursor 2+ or higher (not internal or immonium)
   3 = doubly charged if precursor 3+ or higher (not internal or immonium)
   4 = immonium
   5 = a series
   6 = a - NH3 if a significant and fragment includes RKNQ
   7 = a - H2O if a significant and fragment includes STED
   8 = b series
   9 = b - NH3 if b significant and fragment includes RKNQ
   10= b - H2O if b significant and fragment includes STED
   11= c series
   12= x series
   13= y series
   14= y - NH3 if y significant and fragment includes RKNQ
   15= y - H2O if y significant and fragment includes STED
   16= z series
   17= internal yb < 700 Da
   18= internal ya < 700 Da
   19= y or y++ must be significant
   20= y or y++ must be highest scoring series
   21= z+1 series
   22= d and d' series
   23= v series
   24= w and w' series
   25= z+2 series
See also
getINSTRUMENT() to find the descriptive name of the selected instrument.
https://www.matrixscience.com/help/search_field_help.html#INSTRUMENT
Returns
comma separated list, the rules / ions series used for a search

◆ getSEARCH()

std::string getSEARCH ( )

Returns the type of search – this will be PMF, SQ, MIS.

This is obtained from the SEARCH= line in the parameters section or search__parameters table of the results file.

Rather than using this value directly, it is generally easier to use the functions ms_mascotresfilebase::isMSMS(), ms_mascotresfilebase::isPMF() or ms_mascotresfilebase::isSQ(), and it is normally safer to use ms_mascotresfilebase::anyMSMS(), ms_mascotresfilebase::anyPMF() and ms_mascotresfilebase::anySQ().

Returns
type of the search

◆ getSEG()

int getSEG ( )

Returns the segment or protein mass.

This is obtained from the SEG= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#SEG
Returns
segment or protein mass

◆ getSUBCLUSTER()

int getSUBCLUSTER ( )

Returns the sub cluster number.

This is obtained from the SUBCLUSTER= line in the parameters section or search__parameters table of the results file.

For a large cluster, split up into multiple sub clusters, this returns the sub cluster number.

Returns
The subcluster number.

◆ getTARGET_FDR_PERCENT()

double getTARGET_FDR_PERCENT ( ) const

Returns the target FDR specified as a search parameter.

Available in Mascot 2.8 and later.

See also
https://www.matrixscience.com/help/decoy_help.html#AUTO

The value is obtained from the TARGET_FDR_PERCENT= line in the parameters section or search__parameters table of the results file. If there is no such line, or the value is not a floating point number, this method returns 0.0.

Returns
0.0, or target FDR specified as a percentage.

◆ getTAXONOMY()

std::string getTAXONOMY ( )

Returns the name of the taxonomy selection.

This is obtained from the TAXONOMY= line in the parameters section or search__parameters table of the results file.

To find out exactly which taxa were included and excluded from the search, inspect ms_mascotresfilebase::getTaxonomy().

See also
https://www.matrixscience.com/help/search_field_help.html#TAXONOMY
Returns
name of the taxonomy selection

◆ getTOL()

double getTOL ( )

Returns the peptide tolerance for the search.

This is obtained from the TOL= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#TOL
Returns
peptide tolerance for the search

◆ getTOLU()

std::string getTOLU ( )

Returns the peptide tolerance units for the search.

This is obtained from the TOLU= line in the parameters section or search__parameters table of the results file.

The units will be one of:

%%
fraction expressed as a percentage
mmu
absolute milli-mass units, i.e. units of .001 Da
Da
absolute units of Da
ppm
fraction expressed as parts per million
See also
https://www.matrixscience.com/help/search_field_help.html#TOL
Returns
peptide tolerance units for the search

◆ getUSEREMAIL()

std::string getUSEREMAIL ( )

Returns the user's email address (if any) as entered in the search form.

This is obtained from the USERMAIL= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#NAME
Returns
user email

◆ getUSERField()

std::string getUSERField ( int  num)

Returns the user fields USER00, USER01, USER02 ... USER12.

Parameters
nummust be in the range 0..12.
Returns
user fields

◆ getUSERID()

int getUSERID ( )

Returns the user's USERID.

This is obtained from the USERID= line in the parameters section or search__parameters table of the results file. This value is the user's ID if Mascot security is enabled.

Searches prior to version 2.1 will not have this parameter, in which case it will return 0. For searches with Mascot 2.1 or later, where security is not enabled, this function will also return 0.

See Mascot security and authentication module

Returns
user id

◆ getUSERNAME()

std::string getUSERNAME ( )

Returns the user name (if any) as entered in the search form.

This is obtained from the USERNAME= line in the parameters section or search__parameters table of the results file.

See also
https://www.matrixscience.com/help/search_field_help.html#NAME
Returns
user name as entered in the search form

◆ getVarModsDelta()

double getVarModsDelta ( int  num)

Returns the delta mass for a variable modification.

In dat28 format, this value is obtained from the delta[num]= line in the masses section of the results file. In MSR format, from the search__variable_mods table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
delta mass for a variable modification

◆ getVarModsName()

std::string getVarModsName ( int  num) const

In dat28 format, this value is obtained from the delta[num]= line in the masses section of the results file. In MSR format, from the search__variable_mods table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
name of the specified variable modification selected by the user

◆ getVarModsNeutralLoss()

double getVarModsNeutralLoss ( int  num)

Returns the first neutral loss value of the specified variable modification.

Note
This function is deprecated, since it only returns a single neutral loss value. This function has been replaced with getVarModsNeutralLosses() which returns multiple neutral losses

In dat28 format, the value is obtained from the NeutralLoss[num]= line in the masses section of the results file. In MSR format, from the search__variable_mod_nl table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
first neutral loss value for the specified variable modification.

◆ getVarModsNeutralLosses()

std::vector< double > getVarModsNeutralLosses ( int  num) const

Returns all the neutral loss values of the specified variable modification.

In dat28 format, The first neutral loss is obtained from the NeutralLoss[num]= line in the masses section of the results file. Subsequent neutral losses considered (if any) are obtained from the NeutralLoss[num]_master= line; the first value on the comma separated line would be for neutralLossNum=2, the second for neutralLossNum=3 etc.

In MSR format, the values are fetched from the search__variable_mod_nl table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
neutral loss values for the specified variable modification

◆ getVarModsPepNeutralLoss()

std::vector< double > getVarModsPepNeutralLoss ( int  num)

Returns the peptide neutral loss value(s) of the specified variable modification.

In dat28 format, this value is obtained from the PepNeutralLoss[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__variable_mod_nl table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
peptide neutral loss value(s) for the specified variable modification

◆ getVarModsReqPepNeutralLoss()

std::vector< double > getVarModsReqPepNeutralLoss ( int  num)

Returns the required peptide neutral loss value(s) of the specified variable modification.

In dat28 format, these value is obtained from the ReqPepNeutralLoss[num]= line in the masses section of the results file.

In MSR format, the values are fetched from the search__variable_mod_nl table.

Each variable modification is assigned a number 1 to 32 (up to 32 variable modifications are allowed). In the results, a string is assigned for each matched peptide, and each character in the string will be 0..9A..W (0 for no modification). Information about the modification can be found using these functions:

See the Mascot installation and setup manual (configuration and log files chapter) for more information about variable modifications.

Parameters
numis the modification number. See ms_peptide::getVarModsStr for details of how to obtain this number.
Returns
required peptide neutral loss value(s) for the specified variable modification

◆ hasINTERNALS()

bool hasINTERNALS ( ) const

Returns true if minimum or maximum internal fragment mass was specified.

Introduced in Mascot 2.2, the values for minimum and maximum internal masses are specified in the fragmentation_rules file as

   minInternalMass 0.0
   maxInternalMass 700.0 

The value specified for the instrument is saved in the parameters section or search__parameters table of the results file as INTERNALS=min,max. If there is no INTERNALS= line, this method returns false.

Use getMinInternalMass() and getMaxInternalMass() to access the values.

Returns
true if INTERNALS= was specified.

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