Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches

An eXtracted Ion Chromatogram (XIC). More...

#include <ms_xic.hpp>

Inherits ms_handle.

Public Types

enum  peakState {
  PEAK_STATE_UNKNOWN = 0 ,
  PEAK_STATE_OK = 1 ,
  PEAK_STATE_DISCARD =3
}
 Status codes from fitting peaks. More...
 

Public Member Functions

 ms_xic ()
 Default constructor.
 
 ms_xic (const ms_xic_body &body)
 Populated constructor. Performs a deep copy of the passed object.
 
 ms_xic (ms_xic_body *body)
 Constructor that use the same pointer as passed.
 
void copyFrom (const ms_xic *src)
 Perform a deep copy of the contents.
 
void defaultValues ()
 Use this member to re-initialise internal members.
 
double getElutionTimeShift () const
 Get the elution time shift in seconds.
 
int getEndIndex () const
 Get the end index. Only valid if the XIC was processed separately.
 
int getEndScanId () const
 Get the id of the end scan.
 
int getNumPoints () const
 Get the number of points.
 
int getPeakEndIndex () const
 Get the end of the peak. Only valid if the XIC was processed separately.
 
int getPeakEndScanId () const
 Get the index of the peak end.
 
int getPeakStartIndex () const
 Get the start of the peak. Only valid if the XIC was processed separately.
 
int getPeakStartScanId () const
 Get the index of the peak start.
 
peakState getPeakState () const
 Get the state of the peak.
 
void getPoint (int index, double &rt, int &scanId, double &intensity) const
 Get a point's values; retention time, scan number and intensity (index 1..n).
 
int getRegionEndIndex () const
 Get the end of the region. Only valid if the XIC was processed separately.
 
int getRegionEndScanId () const
 Get the index of the region end.
 
int getRegionStartIndex () const
 Get the start of the region. Only valid if the XIC was processed separately.
 
int getRegionStartScanId () const
 Get the index of the region start.
 
double getRtPeakEnd () const
 Get the retention time of the peak end.
 
double getRtPeakStart () const
 Get the retention time of the peak start.
 
double getRtRegionEnd () const
 Get the retention time of the region end.
 
double getRtRegionStart () const
 Get the retention time of the region start.
 
int getStartIndex () const
 Get the start index. Only valid if the XIC was processed separately.
 
int getStartScanId () const
 Get the id of the start scan.
 
bool getUseTimeShift () const
 Returns true if XIC are aligned based on time instead of scans.
 
bool hasIndexes () const
 Return true if the functions that return indexes have valid data available to return.
 

Static Public Member Functions

static peakState getCodeFromXml (std::string text)
 Get the status code for an XML attribute value.
 
static std::string getXmlCode (peakState code)
 Get the XML attribute value for a status code.
 

Detailed Description

An eXtracted Ion Chromatogram (XIC).

This consists of a number of individual intensity values.

It also has start and end values and indices for the peaks, regions and the chromatogram itself

This is stored in XML in a "xic" entity.

Member Enumeration Documentation

◆ peakState

enum peakState

Status codes from fitting peaks.

See Using enumerated values and static const ints in Perl, Java, Python and C#.

Enumerator
PEAK_STATE_UNKNOWN 

initial value

PEAK_STATE_OK 

element is ok

PEAK_STATE_DISCARD 

discard element from calc

Constructor & Destructor Documentation

◆ ms_xic() [1/3]

ms_xic ( )

Default constructor.

Assigns reasonable default values to all internal members.

◆ ms_xic() [2/3]

ms_xic ( const ms_xic_body &  body)
explicit

Populated constructor. Performs a deep copy of the passed object.

Parameters
bodyThe data loaded from the result file.

◆ ms_xic() [3/3]

ms_xic ( ms_xic_body *  body)
explicit

Constructor that use the same pointer as passed.

Parameters
bodyIs a pointer to existing data. The reference count for this will be incremented by this call.

Member Function Documentation

◆ defaultValues()

void defaultValues ( )

Use this member to re-initialise internal members.

Clears all values

◆ getCodeFromXml()

ms_xic::peakState getCodeFromXml ( std::string  text)
static

Get the status code for an XML attribute value.

Parameters
textThe string used to encode the peak state in the XML file.
Returns
The peak state corresponding to the XML encoded string.

◆ getElutionTimeShift()

double getElutionTimeShift ( ) const

Get the elution time shift in seconds.

Returns
The value of the elution time shift.

◆ getEndIndex()

int getEndIndex ( ) const

Get the end index. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is typically a zero based index of MS1 scans (either Survey or zoom) that have been 'filtered out' from all scan types

Returns
Index at which the the XIC ends.

◆ getEndScanId()

int getEndScanId ( ) const

Get the id of the end scan.

Returns
The scan identifier at which the XIC ends.

◆ getNumPoints()

int getNumPoints ( ) const

Get the number of points.

Returns
The number of points in the XIC.

◆ getPeakEndIndex()

int getPeakEndIndex ( ) const

Get the end of the peak. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is a zero based index into the points array and should be 0..getNumPoints()

Returns
Index at which the peak ends.

◆ getPeakEndScanId()

int getPeakEndScanId ( ) const

Get the index of the peak end.

Returns
The scan identifier at which the peak ends.

◆ getPeakStartIndex()

int getPeakStartIndex ( ) const

Get the start of the peak. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is a zero based index into the points array and should be 0..getNumPoints()

Returns
Index at which the peak starts.

◆ getPeakStartScanId()

int getPeakStartScanId ( ) const

Get the index of the peak start.

Returns
The scan identifier at which the peak starts.

◆ getPeakState()

ms_xic::peakState getPeakState ( ) const

Get the state of the peak.

Returns
The peak state.

◆ getPoint()

void getPoint ( int  index,
double &  rt,
int &  scanId,
double &  intensity 
) const

Get a point's values; retention time, scan number and intensity (index 1..n).

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

Parameters
[in]indexThe index of the point to be queried (1..number of points).
[out]rtFilled with the retention time of the point.
[out]scanIdFilled with the scan identifier of the point.
[out]intensityFilled with the intensity of the point.

◆ getRegionEndIndex()

int getRegionEndIndex ( ) const

Get the end of the region. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is a zero based index into the points array and should be 0..getNumPoints()

Returns
Index at which the region ends.

◆ getRegionEndScanId()

int getRegionEndScanId ( ) const

Get the index of the region end.

Returns
The scan identifier at which the region ends.

◆ getRegionStartIndex()

int getRegionStartIndex ( ) const

Get the start of the region. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is a zero based index into the points array and should be 0..getNumPoints()

Returns
Index at which the region starts.

◆ getRegionStartScanId()

int getRegionStartScanId ( ) const

Get the index of the region start.

Returns
The scan identifier at which the region starts.

◆ getRtPeakEnd()

double getRtPeakEnd ( ) const

Get the retention time of the peak end.

Returns
The retention time of the peak end.

◆ getRtPeakStart()

double getRtPeakStart ( ) const

Get the retention time of the peak start.

Returns
The retention time of the peak start.

◆ getRtRegionEnd()

double getRtRegionEnd ( ) const

Get the retention time of the region end.

Returns
The retention time of the region end.

◆ getRtRegionStart()

double getRtRegionStart ( ) const

Get the retention time of the region start.

Returns
The retention time of the region start.

◆ getStartIndex()

int getStartIndex ( ) const

Get the start index. Only valid if the XIC was processed separately.

If loaded from XML this may be -1. XML version 1 does not store this information and considerable recalculate would be required to reproduce it.

The index is typically a zero based index of MS1 scans (either Survey or zoom) that have been 'filtered out' from all scan types

Returns
Index at which the the XIC starts.

◆ getStartScanId()

int getStartScanId ( ) const

Get the id of the start scan.

Returns
The scan identifier at which the XIC starts.

◆ getUseTimeShift()

bool getUseTimeShift ( ) const

Returns true if XIC are aligned based on time instead of scans.

Returns
True if the elution time shift should be used.

◆ getXmlCode()

std::string getXmlCode ( ms_xic::peakState  code)
static

Get the XML attribute value for a status code.

Parameters
codeThe peak state to get the XML excoding string for.
Returns
The string used to encode the peak state in the XML file.

◆ hasIndexes()

bool hasIndexes ( ) const

Return true if the functions that return indexes have valid data available to return.

XML version 1 does not store this information and considerable recalculate would be required to reproduce it. And it's optional in the XML anyway.

Returns
True if the XIC has all the index information, otherwise false.

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