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

A component within a match. More...

#include <ms_ms1quant_match_component.hpp>

Inherits ms_handle.

Public Member Functions

 ms_ms1quant_match_component ()
 Default constructor.
 
 ms_ms1quant_match_component (const ms_ms1quant_match_component_body &body)
 Populated constructor.
 
double getAbsoluteValue (const int file_index=-1) const
 Get the summed intensity values for this component across the XIC peak. Required for normalisation.
 
std::string getComponent () const
 Get the component.
 
int getFileIndex (const int idx) const
 Return the 1 based file_index.
 
double getMatchedFraction (const int file_index=-1) const
 Get the matched fraction for the specified raw file.
 
double getMatchedRho (const int file_index=-1) const
 Get the matched rho for the specified raw file.
 
double getMoverz () const
 Get the calculated m/z value.
 
int getNumFileIndexesMatched () const
 For replicate, using prefractionation, this can return a value greater than zero.
 
int getNumPeptides (const int file_index=ms_quant_file_index::file_index_value_not_set) const
 Get the number of related peptides.
 
int getNumRanges (const int file_index=ms_quant_file_index::file_index_value_not_set) const
 Get the number of ranges.
 
void getPeptideKey (const int file_index, int index, int &q, int &p) const
 Get a related peptide's feature key by its index (1..n).
 
void getPeptideKey (int index, int &q, int &p) const
 Get a related peptide's feature key by its index (1..n).
 
ms_ms1quant_match_range getRange (const int file_index, int index) const
 Get a range value by its index (1..n).
 
ms_ms1quant_match_range getRange (int index) const
 Get a range value by its index (1..n).
 
double getRelativeMass () const
 Get the relative mass value.
 
std::string getSummedModsStr () const
 Returns the string for any 'summed' modifications for this particular match.
 
std::string getVarModsStr () const
 Returns the string for any 'variable' modifications for this particular match.
 
ms_xic getXic (const int file_index=ms_quant_file_index::file_index_value_not_set) const
 Get the extracted ion chromatogram (XIC).
 
bool hasAbsoluteValue (const int file_index=-1) const
 Check if the absolute value is available.
 
bool hasMatchedFraction (const int file_index=-1) const
 Check if the matched fraction is available for the specified raw file.
 
bool hasMatchedRho (const int file_index=-1) const
 Check if the matched rho is available for the specified raw file.
 
bool isComponentIdentified (const int file_index=-1) const
 Check if the component has been identified.
 

Protected Member Functions

std::size_t getIdxFromFileIndex (const int file_index) const
 Just used internally by inherited classes that need access to inherited XICs etc.
 

Detailed Description

A component within a match.

This is stored in XML in "partner" and "absoluteValue" entities.

Constructor & Destructor Documentation

◆ ms_ms1quant_match_component() [1/2]

Default constructor.

Assigns reasonable default values to all internal members.

◆ ms_ms1quant_match_component() [2/2]

ms_ms1quant_match_component ( const ms_ms1quant_match_component_body &  body)

Populated constructor.

Parameters
bodyThe data loaded from the result file.

Member Function Documentation

◆ getAbsoluteValue()

double getAbsoluteValue ( const int  file_index = -1) const

Get the summed intensity values for this component across the XIC peak. Required for normalisation.

If ratio values not are absolute use total intensity as absolute value

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The absolute ratio value.

◆ getComponent()

std::string getComponent ( ) const

Get the component.

Returns
The name of the component (e.g. "Heavy").

◆ getFileIndex()

int getFileIndex ( const int  idx) const

Return the 1 based file_index.

See getNumFileIndexesMatched()

Parameters
idxmust be in the range 0.. getNumFileIndexesMatched()-1
Returns
the 1 based file index. This component could, for example, have file_index values of 1,5,9,13

◆ getIdxFromFileIndex()

std::size_t getIdxFromFileIndex ( const int  file_index) const
protected

Just used internally by inherited classes that need access to inherited XICs etc.

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
a 0 based internal index into a member vector

◆ getMatchedFraction()

double getMatchedFraction ( const int  file_index = -1) const

Get the matched fraction for the specified raw file.

This is only used for the replicate protocol where data sets have been merged. For the precursor protocol, use matrix_science::ms_ms1quant_charge_state::getMatchedFraction

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The matched fraction value.

◆ getMatchedRho()

double getMatchedRho ( const int  file_index = -1) const

Get the matched rho for the specified raw file.

This is only used for the replicate protocol where data sets have been merged. For the precursor protocol, use matrix_science::ms_ms1quant_charge_state::getMatchedRho

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The matched rho value.

◆ getMoverz()

double getMoverz ( ) const

Get the calculated m/z value.

Returns
The m/z value.

◆ getNumFileIndexesMatched()

int getNumFileIndexesMatched ( ) const

For replicate, using prefractionation, this can return a value greater than zero.

For protocols other than replicate, this will always return 1.

For replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.

See also
getFileIndex()
Returns
the number of file_indexes

◆ getNumPeptides()

int getNumPeptides ( const int  file_index = ms_quant_file_index::file_index_value_not_set) const

Get the number of related peptides.

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The number of related peptides.

◆ getNumRanges()

int getNumRanges ( const int  file_index = ms_quant_file_index::file_index_value_not_set) const

Get the number of ranges.

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The number of ranges.

◆ getPeptideKey() [1/2]

void getPeptideKey ( const int  file_index,
int  index,
int &  q,
int &  p 
) const

Get a related peptide's feature key by its index (1..n).

See Multiple return values in Perl, Java, Python and C#.

The returned keys can be used to get the ms_peptide using ms_mascotresults::getPeptide().

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
indexThe index of the required peptide (1..getNumPeptides()).
qThe query number.
pThe rank.

◆ getPeptideKey() [2/2]

void getPeptideKey ( int  index,
int &  q,
int &  p 
) const

Get a related peptide's feature key by its index (1..n).

See Multiple return values in Perl, Java, Python and C#.

The returned keys can be used to get the ms_peptide using ms_mascotresults::getPeptide().

Parameters
indexThe index of the required peptide (1..getNumPeptides()).
qThe query number.
pThe rank.

◆ getRange() [1/2]

matrix_science::ms_ms1quant_match_range getRange ( const int  file_index,
int  index 
) const

Get a range value by its index (1..n).

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
indexThe index of the required range (1..getNumRanges()).
Returns
The ms_ms1quant_match_range.

◆ getRange() [2/2]

matrix_science::ms_ms1quant_match_range getRange ( int  index) const

Get a range value by its index (1..n).

Parameters
indexThe index of the required range (1..getNumRanges()).
Returns
The ms_ms1quant_match_range.

◆ getRelativeMass()

double getRelativeMass ( ) const

Get the relative mass value.

Returns
The relative mass value.

◆ getSummedModsStr()

std::string getSummedModsStr ( ) const

Returns the string for any 'summed' modifications for this particular match.

See ms_peptide::getSummedModsStr for details of the format

Returns
the encoded summed mods string

◆ getVarModsStr()

std::string getVarModsStr ( ) const

Returns the string for any 'variable' modifications for this particular match.

See ms_peptide::getVarModsStr for details of the format

Returns
the encoded variable mods string

◆ getXic()

Get the extracted ion chromatogram (XIC).

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
The ms_xic.

◆ hasAbsoluteValue()

bool hasAbsoluteValue ( const int  file_index = -1) const

Check if the absolute value is available.

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
True if the absolute value is available (some older datasets may not hold the value).

◆ hasMatchedFraction()

bool hasMatchedFraction ( const int  file_index = -1) const

Check if the matched fraction is available for the specified raw file.

This is only used for the replicate protocol where data sets have been merged. For the precursor protocol, use matrix_science::ms_ms1quant_charge_state::getMatchedFraction

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
True if the matched fraction value is available.

◆ hasMatchedRho()

bool hasMatchedRho ( const int  file_index = -1) const

Check if the matched rho is available for the specified raw file.

This is only used for the replicate protocol where data sets have been merged. For the precursor protocol, use matrix_science::ms_ms1quant_charge_state::getMatchedRho

Parameters
file_indexis used for replicate, where the samples have been prefractionated and there is a raw data file for each fraction, the method can be set up so that each component (i.e. sample) has a number of file_index values, one for each file.
Returns
True if the matchedRho value is available.

◆ isComponentIdentified()

bool isComponentIdentified ( const int  file_index = -1) const

Check if the component has been identified.

Parameters
file_indexis used for replicate where a component comprises multiple raw data files, for example using prefractionation. This value defaults to ms_quant_file_index::file_index_value_not_set where the component match just originates from one data file
Returns
True if the component has been identified.

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