mgf::MgfSpectrum Class Reference

An MgfSpectrum holds a fragment ion series and the corresponding (local) search parameters. More...

#include <MgfSpectrum.h>

Inheritance diagram for mgf::MgfSpectrum:
mgf::Collection< MassAbundancePair >

List of all members.

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)

Detailed Description

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


Constructor & Destructor Documentation

mgf::MgfSpectrum::MgfSpectrum (  ) 

Default constructor.

Constructs an empty MgfSpectrum.


Member Function Documentation

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.

See also:
http://www.matrixscience.com/help/search_field_help.html#TWO
Parameters:
[out] charges The charge vector.
std::string mgf::MgfSpectrum::getCOMP ( void   )  const

Get amino acid composition information.

See also:
http://www.matrixscience.com/help/sq_help.html#COMP
Returns:
An amino acid composition string.
std::string mgf::MgfSpectrum::getETAG ( void   )  const

Get.

See also:
Returns:
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.

Returns:
The.
void mgf::MgfSpectrum::getIONS ( std::vector< MassAbundancePair > &  ions  )  const

Get.

See also:
Returns:
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..

Returns:
A string of variable modifications.
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.

Returns:
A pair of precursor mass and (optionally) abundance.
std::pair< double, double > mgf::MgfSpectrum::getRTINSECONDS ( void   )  const

Get the retention time range of the precursor scans.

Returns:
The retention time range of the precursor scans, in seconds. If the precursors stem from a single scan, the .second entry of the returned std::pair equals -1.0.
std::pair< int, int > mgf::MgfSpectrum::getSCANS ( void   )  const

Get the scan number or scan number range from which this fragmentation spectrum was generated.

See also:
http://www.matrixscience.com/help/data_file_help.html
Returns:
A pair of scan numbers. For fragmentation spectra of single scans, the .second value of the return value equals -1.
std::string mgf::MgfSpectrum::getSEQ ( void   )  const

Get the amino acid sequence.

Please consult the detailed description in the Mascot documentation (see link).

See also:
http://www.matrixscience.com/help/sq_help.html#SEQ
Returns:
The amino acid sequence.
std::string mgf::MgfSpectrum::getTAG ( void   )  const

Get the sequence tag.

Please consult the detailed description in the Mascot documentation (see link).

See also:
http://www.matrixscience.com/help/sq_help.html#TAG
Returns:
The sequence tag.
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.

See also:
http://www.matrixscience.com/help/data_file_help.html
Returns:
The query title.
double mgf::MgfSpectrum::getTOL ( void   )  const

Get the search tolerance.

The return value is unit-dependent. The unit is available via getTOLU().

See also:
http://www.matrixscience.com/help/search_field_help.html#TOL
Returns:
The search tolerance.
std::string mgf::MgfSpectrum::getTOLU ( void   )  const

Get the unit in which the tolerance is specified.

Valid values are %, ppm, mmu and Da).

Returns:
A string specifying the tolerance unit.
void mgf::MgfSpectrum::setCHARGE ( const std::vector< int > &  charges  ) 

Set the precursor charges for which a search is requested.

See also:
http://www.matrixscience.com/help/search_field_help.html#TWO
Parameters:
[in] charges The charge vector.
void mgf::MgfSpectrum::setCOMP ( const std::string &  comp  ) 

Set the amino acid composition information.

See also:
http://www.matrixscience.com/help/sq_help.html#COMP
Parameters:
[in] An amino acid composition string.
void mgf::MgfSpectrum::setETAG ( const std::string &  etag  ) 

Set.

See also:
Parameters:
[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.

Parameters:
[in] instrument The
void mgf::MgfSpectrum::setIONS ( const std::vector< MassAbundancePair > &  ions  ) 

Set.

See also:
Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

Parameters:
[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.

See also:
http://www.matrixscience.com/help/data_file_help.html
Parameters:
[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.

See also:
http://www.matrixscience.com/help/data_file_help.html
Parameters:
[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).

See also:
http://www.matrixscience.com/help/sq_help.html#SEQ
Parameters:
[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).

See also:
http://www.matrixscience.com/help/sq_help.html#TAG
Parameters:
[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.

See also:
http://www.matrixscience.com/help/data_file_help.html
Parameters:
[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().

See also:
http://www.matrixscience.com/help/search_field_help.html#TOL
Parameters:
[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).

Parameters:
[in] tolu The tolerance unit.

The documentation for this class was generated from the following files:
All Classes Namespaces Functions Variables Typedefs Friends

Generated on Sun Oct 10 10:20:34 2010 for mgfp by  doxygen 1.6.1