An MgfSpectrum holds a fragment ion series and the corresponding (local) search parameters. More...
#include <MgfSpectrum.h>
Public Member Functions | |
MgfSpectrum () | |
Default constructor. | |
std::vector< int > | getCHARGE (void) 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. | |
std::string | getCOMP (void) const |
Get amino acid composition information. | |
void | setCOMP (const std::string &comp) |
Set the amino acid composition information. | |
std::string | getETAG (void) const |
Get. | |
void | setETAG (const std::string &etag) |
Set. | |
std::string | getINSTRUMENT (void) const |
Get the instrument type/fragmentation rules. | |
void | setINSTRUMENT (const std::string &instrument) |
Set the instrument type/fragementation rules. | |
void | getIONS (std::vector< MassAbundancePair > &ions) const |
Get. | |
void | setIONS (const std::vector< MassAbundancePair > &ions) |
Set. | |
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::pair< double, double > | getPEPMASS (void) const |
Get the peptide mass and (optionally) the abundance of the precursor. | |
void | setPEPMASS (const std::pair< double, double > pepmass) |
Set the peptide mass and (optionally) the abundance of the precursor. | |
std::pair< double, double > | getRTINSECONDS (void) const |
Get the retention time range of the precursor scans. | |
void | setRTINSECONDS (const std::pair< double, double > &rtinseconds) |
Set the retention time range of the precursor scans. | |
void | setRTINSECONDS (const double rtinseconds) |
Set the retention time range of a single precursor scan. | |
std::pair< int, int > | getSCANS (void) const |
Get the scan number or scan number range from which this fragmentation spectrum was generated. | |
void | setSCANS (const std::pair< int, int > &scans) |
Set the scan number or scan number range from which this fragmentation spectrum was generated. | |
void | setSCANS (const int scans) |
Set the scan number from which this fragmentation spectrum was generated. | |
std::string | getSEQ (void) const |
Get the amino acid sequence. | |
void | setSEQ (const std::string &seq) |
Get the amino acid sequence. | |
std::string | getTAG (void) const |
Get the sequence tag. | |
void | setTAG (const std::string &tag) |
Set the sequence tag. | |
std::string | getTITLE (void) const |
Get the query title. | |
void | setTITLE (const std::string &title) |
Set the query title. | |
double | getTOL (void) const |
Get the search tolerance. | |
void | setTOL (const double tol) |
Set the search tolerance. | |
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. | |
void | clear () |
Clear all data from the MgfSpectrum. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const MgfSpectrum &mgf) |
An MgfSpectrum holds a fragment ion series and the corresponding (local) search parameters.
The parameter set, their values and syntax are taken from the MatrixScience format help file at http://www.matrixscience.com/help/data_file_help.html#GEN
mgf::MgfSpectrum::MgfSpectrum | ( | ) |
Default constructor.
Constructs an empty MgfSpectrum.
void mgf::MgfSpectrum::clear | ( | ) | [virtual] |
Clear all data from the MgfSpectrum.
Reimplemented from mgf::Collection< MassAbundancePair >.
std::vector< int > mgf::MgfSpectrum::getCHARGE | ( | void | ) | const |
Get the precursor charges for which a search is requested.
[out] | charges | The charge vector. |
std::string mgf::MgfSpectrum::getCOMP | ( | void | ) | const |
Get amino acid composition information.
std::string mgf::MgfSpectrum::getETAG | ( | void | ) | const |
Get.
std::string mgf::MgfSpectrum::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.
void mgf::MgfSpectrum::getIONS | ( | std::vector< MassAbundancePair > & | ions | ) | const |
Get.
std::string mgf::MgfSpectrum::getIT_MODS | ( | void | ) | const |
Get the string representation of the variable modifications.
The modification string specifies which variable post-translational modifications are searched in the Mascot query associated with the current MgfSpectrum..
std::pair< double, double > mgf::MgfSpectrum::getPEPMASS | ( | void | ) | const |
Get the peptide mass and (optionally) the abundance of the precursor.
The .first part of the return value holds the precursor mass, in m/z. To determine relative (i.e. uncharged) mass, consult the precursor charges, available via getCHARGES(). If specified in the MGF file, the
.second element of the return value holds the precursor abundance. If no precursor abundance was specified, then
.second == 0
.
std::pair< double, double > mgf::MgfSpectrum::getRTINSECONDS | ( | void | ) | const |
Get the retention time range of the precursor scans.
std::pair< int, int > mgf::MgfSpectrum::getSCANS | ( | void | ) | const |
Get the scan number or scan number range from which this fragmentation spectrum was generated.
std::string mgf::MgfSpectrum::getSEQ | ( | void | ) | const |
Get the amino acid sequence.
Please consult the detailed description in the Mascot documentation (see link).
std::string mgf::MgfSpectrum::getTAG | ( | void | ) | const |
Get the sequence tag.
Please consult the detailed description in the Mascot documentation (see link).
std::string mgf::MgfSpectrum::getTITLE | ( | void | ) | const |
Get the query title.
This returns the title of the query that corresponds to the spectrum at hand.
double mgf::MgfSpectrum::getTOL | ( | void | ) | const |
Get the search tolerance.
The return value is unit-dependent. The unit is available via getTOLU().
std::string mgf::MgfSpectrum::getTOLU | ( | void | ) | const |
Get the unit in which the tolerance is specified.
Valid values are %, ppm, mmu and Da).
void mgf::MgfSpectrum::setCHARGE | ( | const std::vector< int > & | charges | ) |
Set the precursor charges for which a search is requested.
[in] | charges | The charge vector. |
void mgf::MgfSpectrum::setCOMP | ( | const std::string & | comp | ) |
Set the amino acid composition information.
[in] | An | amino acid composition string. |
void mgf::MgfSpectrum::setETAG | ( | const std::string & | etag | ) |
Set.
[in] |
void mgf::MgfSpectrum::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::MgfSpectrum::setIONS | ( | const std::vector< MassAbundancePair > & | ions | ) |
Set.
[in] |
void mgf::MgfSpectrum::setIT_MODS | ( | const std::string & | it_mods | ) |
Set the variable modification string.
The modfication string specifies which variable post-translational modifications are searched in the Mascot query associated with the current MgfSpectrum. Strings should conform to UniMod standards.
[in] | it_mods | The modification string. |
void mgf::MgfSpectrum::setPEPMASS | ( | const std::pair< double, double > | pepmass | ) |
Set the peptide mass and (optionally) the abundance of the precursor.
pepmass.first
must hold the precursor mass, in m/z. Optionally, pepmass.second
may hold the precursor abundance. If no abundance value is available, pepmass.second
must be set to zero.
[in] | pepmass | A pair of precursor mass and (optionally) abundance. |
void mgf::MgfSpectrum::setRTINSECONDS | ( | const double | rtinseconds | ) |
Set the retention time range of a single precursor scan.
[in] | rtinseconds | The retention time of the precursor scan, in seconds. |
void mgf::MgfSpectrum::setRTINSECONDS | ( | const std::pair< double, double > & | rtinseconds | ) |
Set the retention time range of the precursor scans.
[in] | rtinseconds | The retention time of the precursor scan(s), in seconds. For single scans, use -1.0 as .second value or the alternate setRTINSECONDS function that takes a single double. |
void mgf::MgfSpectrum::setSCANS | ( | const int | scans | ) |
Set the scan number from which this fragmentation spectrum was generated.
This is just a convenience function wrapper for single scans.
[in] | A | scan number. |
void mgf::MgfSpectrum::setSCANS | ( | const std::pair< int, int > & | scans | ) |
Set the scan number or scan number range from which this fragmentation spectrum was generated.
[in] | A | pair [start, end] of scan numbers. For single scans use [scanNumber, -1]. |
void mgf::MgfSpectrum::setSEQ | ( | const std::string & | seq | ) |
Get the amino acid sequence.
Please consult the detailed description in the Mascot documentation (see link).
[in] | seq | The amino acid sequence. |
void mgf::MgfSpectrum::setTAG | ( | const std::string & | tag | ) |
Set the sequence tag.
Please consult the detailed description in the Mascot documentation (see link).
[in] | tag | A sequence tag string. |
void mgf::MgfSpectrum::setTITLE | ( | const std::string & | title | ) |
Set the query title.
Set the title of the query that corresponds to the spectrum at hand.
[in] | title | The query title. |
void mgf::MgfSpectrum::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::MgfSpectrum::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. |