Mascot Generic Format file header (global parameters) information. More...
#include <MgfHeader.h>
Public Member Functions | |
std::string | getCLE (void) const |
Get the name of the enzyme used for digestion. | |
void | setCLE (const std::string &cle) |
Set the name of the enzyme used for digestion. | |
std::string | getCOM (void) const |
Get the search title. | |
void | setCOM (const std::string &com) |
Set the search title. | |
std::string | getDB (void) const |
Get the database name agains which Mascot should search. | |
void | setDB (const std::string &db) |
Set the sequence database name that specifies the database against which searches should be carreid out. | |
std::string | getFORMAT (void) const |
Get the MS/MS data file format. | |
void | setFORMAT (const std::string &format) |
Set the MS/MS data file format. | |
std::string | getINSTRUMENT (void) const |
Get the instrument type/fragmentation rules. | |
void | setINSTRUMENT (const std::string &instrument) |
Set the instrument type/fragementation rules. | |
std::string | getIT_MODS (void) const |
Get the string representation of the variable modifications. | |
void | setIT_MODS (const std::string &it_mods) |
Set the variable modification string. | |
std::string | getITOLU (void) const |
Get the unit used to specify the fragmentation ion tolerance. | |
void | setITOLU (const std::string &itolu) |
Set the unit used to specify the fragmentation ion tolerance. | |
std::string | getMASS (void) const |
Get the type of mass reported for the parent ion: monoisotopic or average. | |
void | setMASS (const std::string &mass) |
Set the parent io mass type: monoisotopic or average. | |
std::string | getMODS (void) const |
Get the string representation of fixed modifications. | |
void | setMODS (const std::string &mods) |
Set the string representation of fixed modifications. | |
std::string | getQUANTITATION (void) const |
Get the strign that identifies the quantitation method. | |
void | setQUANTITATION (const std::string &quantitation) |
Set the strign that identifies the quantitation method. | |
std::string | getREPORT (void) const |
Get the maximum number of hits that are being reported in the results. | |
void | setREPORT (const std::string &report) |
Set the maximum number of hits that are being reported in the results. | |
std::string | getREPTYPE (void) const |
Get the report type identifier. | |
void | setREPTYPE (const std::string &reptype) |
Get the report type identifier. | |
std::string | getSEARCH (void) const |
Get the type of search specified for the underlying MgfFile object. | |
void | setSEARCH (const std::string &search) |
Set the type of search specified for the underlying MgfFile object. | |
std::string | getTAXONOMY (void) const |
Get the taxonomy (as specified in Mascot's taxonomy file). | |
void | setTAXONOMY (const std::string &taxonomy) |
Set the taxonomy (as specified in Mascot's taxonomy file). | |
std::string | getTOLU (void) const |
Get the unit in which the tolerance is specified. | |
void | setTOLU (const std::string &tolu) |
Set the unit in which the tolerance is specified. | |
std::string | getUSEREMAIL (void) const |
Get the user email address. | |
void | setUSEREMAIL (const std::string &useremail) |
Set the user email address. | |
std::string | getUSERNAME (void) const |
Get the name of the user submitting the search. | |
void | setUSERNAME (const std::string &username) |
Set the name of the user submitting the search. | |
int | getPFA (void) const |
Get the number of allowed missed cleavages. | |
void | setPFA (const int pfa) |
Set the number of allowed missed cleavages. | |
int | getDECOY (void) const |
Get the decoy search flag (0=false, 1=true). | |
void | setDECOY (const int decoy) |
Set the decoy search flag (0=false, 1=true). | |
int | getERRORTOLERANT (void) const |
Get the status of the error-tolerant search flag. | |
void | setERRORTOLERANT (const int errortolerant) |
Set the status of the error-tolerant search flag. | |
double | getPEP_ISOTOPE_ERROR (void) const |
Get the status of the isotope error correction flag. | |
void | setPEP_ISOTOPE_ERROR (const double pep_isotope_error) |
Set/unset the peptide isotope error correction flag. | |
double | getITOL (void) const |
Get the fragment ion tolerance. | |
void | setITOL (const double itol) |
Set the fragment ion tolerance. | |
double | getPRECURSOR (void) const |
Get the scan precursor mass (in m/z). | |
void | setPRECURSOR (const double precursor) |
Set the precursor mass (in m/z). | |
double | getSEG (void) const |
Get the mass of the intact protein. | |
void | setSEG (const double seg) |
Set the mass of the intact protein. | |
double | getTOL (void) const |
Get the search tolerance. | |
void | setTOL (const double tol) |
Set the search tolerance. | |
void | getCHARGE (std::vector< int > &charges) const |
Get the precursor charges for which a search is requested. | |
void | setCHARGE (const std::vector< int > &charges) |
Set the precursor charges for which a search is requested. | |
void | getFRAMES (std::vector< int > &frames) const |
Get the type of NA translation. | |
void | setFRAMES (const std::vector< int > &frames) |
Get the type of NA translation. | |
void | clear () |
Clear all information from the current MgfHeader object. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const MgfHeader &mgf) |
Output operator. |
Mascot Generic Format file header (global parameters) information.
MGF files hold global and local parameters. Whereas local parameters are stored with the respective MgfSpectrum, MgfHeader is where the global variables reside. The description and values of the variables are taken from the official MatrixScience format information page at http://www.matrixscience.com/help/data_file_help.html#GEN..
void mgf::MgfHeader::clear | ( | ) |
Clear all information from the current MgfHeader object.
void mgf::MgfHeader::getCHARGE | ( | std::vector< int > & | charges | ) | const |
Get the precursor charges for which a search is requested.
[out] | charges | The charge vector. |
std::string mgf::MgfHeader::getCLE | ( | void | ) | const |
Get the name of the enzyme used for digestion.
std::string mgf::MgfHeader::getCOM | ( | void | ) | const |
Get the search title.
std::string mgf::MgfHeader::getDB | ( | void | ) | const |
Get the database name agains which Mascot should search.
int mgf::MgfHeader::getDECOY | ( | void | ) | const |
Get the decoy search flag (0=false, 1=true).
int mgf::MgfHeader::getERRORTOLERANT | ( | void | ) | const |
Get the status of the error-tolerant search flag.
std::string mgf::MgfHeader::getFORMAT | ( | void | ) | const |
Get the MS/MS data file format.
Valid values are Mascot generic (the default), Sequest (.DTA), Finnigan (.ASC), Micromass (.PKL), PerSeptive (.PKS), Sciex API III, Bruker (.XML), mzData (.XML).
void mgf::MgfHeader::getFRAMES | ( | std::vector< int > & | frames | ) | const |
Get the type of NA translation.
The default value is an array of [1, 2, 3, 4, 5, 6]. Documentation on this parameter and its exact use is sparse.
std::string mgf::MgfHeader::getINSTRUMENT | ( | void | ) | const |
Get the instrument type/fragmentation rules.
Based on the definitions in the Mascot fragmentation_rules
configuration files, this defines the type of instrument Mascot expects and the fragmentation scheme used to derive the theoretical fragementation spectra.
std::string mgf::MgfHeader::getIT_MODS | ( | void | ) | const |
Get the string representation of the variable modifications.
The modification string specifies which variable post-translational modifications are searched in a Mascot query.
double mgf::MgfHeader::getITOL | ( | void | ) | const |
Get the fragment ion tolerance.
Keep in mind that the value is unit dependent and the unit is available via getITOLU().
std::string mgf::MgfHeader::getITOLU | ( | void | ) | const |
Get the unit used to specify the fragmentation ion tolerance.
Valid values are mmu and Da.
std::string mgf::MgfHeader::getMASS | ( | void | ) | const |
Get the type of mass reported for the parent ion: monoisotopic or average.
std::string mgf::MgfHeader::getMODS | ( | void | ) | const |
Get the string representation of fixed modifications.
The modification string specifies which fixed post-translational modifications are searched in all Mascot queries in the MgfFile object. The setting may be overridden in individual MgfSpectrum instances.
double mgf::MgfHeader::getPEP_ISOTOPE_ERROR | ( | void | ) | const |
Get the status of the isotope error correction flag.
The flag controls whether Mascot also attempts to find peptide-spectral matches for a precursor mass -1m/z. This counters situations in which the instrument picks the second isotope as parent mass.
int mgf::MgfHeader::getPFA | ( | void | ) | const |
Get the number of allowed missed cleavages.
The range allowed by Mascot is [0-9], defaults to 1.
double mgf::MgfHeader::getPRECURSOR | ( | void | ) | const |
Get the scan precursor mass (in m/z).
std::string mgf::MgfHeader::getQUANTITATION | ( | void | ) | const |
Get the strign that identifies the quantitation method.
Method strings are defined in Mascot's quantitation.xml
file. Defined for MIS only.
std::string mgf::MgfHeader::getREPORT | ( | void | ) | const |
Get the maximum number of hits that are being reported in the results.
Vaild values are AUTO or an integer.
std::string mgf::MgfHeader::getREPTYPE | ( | void | ) | const |
Get the report type identifier.
Valid values are
std::string mgf::MgfHeader::getSEARCH | ( | void | ) | const |
Get the type of search specified for the underlying MgfFile object.
Valid values are PMF, SQ, MIS.
double mgf::MgfHeader::getSEG | ( | void | ) | const |
Get the mass of the intact protein.
The intacat mass is in Da, applied as a sliding windows. Follow the link for more information.
std::string mgf::MgfHeader::getTAXONOMY | ( | void | ) | const |
Get the taxonomy (as specified in Mascot's taxonomy file).
double mgf::MgfHeader::getTOL | ( | void | ) | const |
Get the search tolerance.
The return value is unit-dependent. The unit is available via getTOLU().
std::string mgf::MgfHeader::getTOLU | ( | void | ) | const |
Get the unit in which the tolerance is specified.
Valid values are %, ppm, mmu and Da).
std::string mgf::MgfHeader::getUSEREMAIL | ( | void | ) | const |
Get the user email address.
std::string mgf::MgfHeader::getUSERNAME | ( | void | ) | const |
Get the name of the user submitting the search.
void mgf::MgfHeader::setCHARGE | ( | const std::vector< int > & | charges | ) |
Set the precursor charges for which a search is requested.
[in] | charges | The charge vector. |
void mgf::MgfHeader::setCLE | ( | const std::string & | cle | ) |
Set the name of the enzyme used for digestion.
If the MGF file is to be searched, then the name needs to correspond to an enzyme name specified in the Mascot enzyme file. Because there is no way for mgfp to check the validity of the string, the responsibility for valid enzyme names lies with the user.
[in] | cle | The enzyme string (e.g. Trypsin). |
void mgf::MgfHeader::setCOM | ( | const std::string & | com | ) |
Set the search title.
[in] | com | The search title. |
void mgf::MgfHeader::setDB | ( | const std::string & | db | ) |
Set the sequence database name that specifies the database against which searches should be carreid out.
[in] | db | The database name. |
void mgf::MgfHeader::setDECOY | ( | const int | decoy | ) |
Set the decoy search flag (0=false, 1=true).
[in] | decoy | The decoy search flag. |
void mgf::MgfHeader::setERRORTOLERANT | ( | const int | errortolerant | ) |
Set the status of the error-tolerant search flag.
Error-tolerant searchs are not available for PMF queries.
[in] | errortolerant | The desired value of the error-tolerant search flag (0=off, 1=on). |
void mgf::MgfHeader::setFORMAT | ( | const std::string & | format | ) |
Set the MS/MS data file format.
Valid values are Mascot generic (the default), Sequest (.DTA), Finnigan (.ASC), Micromass (.PKL), PerSeptive (.PKS), Sciex API III, Bruker (.XML), mzData (.XML).
[in] | format | Data file format string. |
void mgf::MgfHeader::setFRAMES | ( | const std::vector< int > & | frames | ) |
Get the type of NA translation.
The default value is an array of [1, 2, 3, 4, 5, 6]. Documentation on this parameter and its exact use is sparse.
[in] | frames | The list of translations (?). |
void mgf::MgfHeader::setINSTRUMENT | ( | const std::string & | instrument | ) |
Set the instrument type/fragementation rules.
Valid values are defined in the Mascot fragmentation_rules
configuration file. There is no way for mgfp to validate the user input, hence the responsibility lies with the user.
[in] | instrument | The |
void mgf::MgfHeader::setIT_MODS | ( | const std::string & | it_mods | ) |
Set the variable modification string.
The modfication string specifies which variable post-translational modifications are searched in a Mascot query. Strings should conform to UniMod standards.
[in] | it_mods | The modification string. |
void mgf::MgfHeader::setITOL | ( | const double | itol | ) |
Set the fragment ion tolerance.
Also make sure to use setITOLU() to specify the correct fragment ion tolerance unit.
[in] | itol | The fragment ion tolerance. |
void mgf::MgfHeader::setITOLU | ( | const std::string & | itolu | ) |
Set the unit used to specify the fragmentation ion tolerance.
Valid values are mmu and Da. Currently, the responsibility for valid input lies with the user.
[in] | itolu | The fragmentation ion tolerance unit. |
void mgf::MgfHeader::setMASS | ( | const std::string & | mass | ) |
Set the parent io mass type: monoisotopic or average.
[in] | mass | The |
void mgf::MgfHeader::setMODS | ( | const std::string & | mods | ) |
Set the string representation of fixed modifications.
The modification string specifies which fixed post-translational modifications are searched in all Mascot queries in the MgfFile object. The setting may be overridden in individual MgfSpectrum instances. The modification string mus conform to UniMod standards.
[in] | mods | A string representation of fixed modifications used for all spectra in the cuffrrent MfgFile object (may be overridden in particular MgfSpectrum objects). |
void mgf::MgfHeader::setPEP_ISOTOPE_ERROR | ( | const double | pep_isotope_error | ) |
Set/unset the peptide isotope error correction flag.
The flag controls whether Mascot also attempts to find peptide-spectral matches for a precursor mass -1m/z. This counters situations in which the instrument picks the second isotope as parent mass.
[in] | pep_isotope_error | The desired value of the peptide isotope error flag. |
void mgf::MgfHeader::setPFA | ( | const int | pfa | ) |
Set the number of allowed missed cleavages.
The range allowd by Mascot is [0-9], defaults to 1.
[in] | pfa | The number of missed cleavages. |
void mgf::MgfHeader::setPRECURSOR | ( | const double | precursor | ) |
Set the precursor mass (in m/z).
[in] | precursor | The mass value of the precursor (in m/z). |
void mgf::MgfHeader::setQUANTITATION | ( | const std::string & | quantitation | ) |
Set the strign that identifies the quantitation method.
Method strings are defined in Mascot's quantitation.xml
file. Defined for MIS only.
[in] | quantitation | The quantitation identification string. |
void mgf::MgfHeader::setREPORT | ( | const std::string & | report | ) |
Set the maximum number of hits that are being reported in the results.
Vaild values are AUTO or an integer.
[in] | report | The maximum number of hits (as a std::string ). |
void mgf::MgfHeader::setREPTYPE | ( | const std::string & | reptype | ) |
Get the report type identifier.
Valid values are
It is the user's responsibility to supply valid identifiers.
[in] | reptype | The report type identifier. |
void mgf::MgfHeader::setSEARCH | ( | const std::string & | search | ) |
Set the type of search specified for the underlying MgfFile object.
Valid values are PMF, SQ, MIS. It is the user's responsibility to supply a valid string.
[in] | search | The search type string. |
void mgf::MgfHeader::setSEG | ( | const double | seg | ) |
Set the mass of the intact protein.
The intacat mass is in Da, applied as a sliding windows. Follow the link for more information and information on how to set the parameter correctly.
[in] | seg | The |
void mgf::MgfHeader::setTAXONOMY | ( | const std::string & | taxonomy | ) |
Set the taxonomy (as specified in Mascot's taxonomy file).
[in] | taxonomy | The taxonomy. |
void mgf::MgfHeader::setTOL | ( | const double | tol | ) |
Set the search tolerance.
The tolerance value depends on the tolerance unit which can be set using setTOLU().
[in] | tol | The |
void mgf::MgfHeader::setTOLU | ( | const std::string & | tolu | ) |
Set the unit in which the tolerance is specified.
Valid values are %, ppm, mmu and Da).
[in] | tolu | The tolerance unit. |
void mgf::MgfHeader::setUSEREMAIL | ( | const std::string & | useremail | ) |
Set the user email address.
[in] | useremail | The user email address as abc@example.org. |
void mgf::MgfHeader::setUSERNAME | ( | const std::string & | username | ) |
Set the name of the user submitting the search.
[in] | username | The username. |
std::ostream& operator<< | ( | std::ostream & | os, | |
const MgfHeader & | mgf | |||
) | [friend] |
Output operator.
Defining the stream operator as a friend keeps the header elements accessible. This allows us to iterate over the elemtents instead of calling the get
function for each entry and checking the return value.