pappsomspp
Library for mass spectrometry
pappso::FilterTandemDeisotope Class Reference

Deisotope the mass spectrum this mass spectrum is iterated over and according to a data point-based moving window progression does the following tests: More...

#include <filtertandemremovec13.h>

Inheritance diagram for pappso::FilterTandemDeisotope:
pappso::MassSpectrumFilterInterface

Public Member Functions

 FilterTandemDeisotope ()
 
 FilterTandemDeisotope (const FilterTandemDeisotope &other)
 
MassSpectrumfilter (MassSpectrum &data_points) const override
 

Private Attributes

double m_arbitrary_range_between_isotopes = 0.95
 
double m_arbitrary_minimum_mz = 200.0
 

Detailed Description

Deisotope the mass spectrum this mass spectrum is iterated over and according to a data point-based moving window progression does the following tests:

  • any data point having a x value (m/z value) less than 200 is conserved;
  • any data point having a x value greater than the previous data point's x value by at least 0.95 is conserved;

remove isotopes as in X!Tandem algorithm this method doesn't really remove isotopes: it cleans up multiple intensities within one Dalton of each other.

Definition at line 84 of file filtertandemremovec13.h.

Constructor & Destructor Documentation

◆ FilterTandemDeisotope() [1/2]

FilterTandemDeisotope::FilterTandemDeisotope ( )

Definition at line 86 of file filtertandemremovec13.cpp.

87 {
88 }

◆ FilterTandemDeisotope() [2/2]

FilterTandemDeisotope::FilterTandemDeisotope ( const FilterTandemDeisotope other)

Definition at line 91 of file filtertandemremovec13.cpp.

92 {
93 }

Member Function Documentation

◆ filter()

MassSpectrum & FilterTandemDeisotope::filter ( MassSpectrum data_points) const
overridevirtual

Implements pappso::MassSpectrumFilterInterface.

Definition at line 96 of file filtertandemremovec13.cpp.

97 {
98 
99  MassSpectrum massSpectrum;
100 
101  if(data_points.size() > 0)
102  {
103  auto it = data_points.begin() + 1;
104  auto itEnd = data_points.end();
105 
106  DataPoint dataPoint = data_points.at(0);
107 
108  while(it != itEnd)
109  {
110  if((it->x < m_arbitrary_minimum_mz) ||
111  ((it->x - dataPoint.x) >= m_arbitrary_range_between_isotopes))
112  {
113  massSpectrum.push_back(dataPoint);
114  dataPoint = *it;
115  }
116  else if(it->y > dataPoint.y)
117  {
118  dataPoint = *it;
119  }
120 
121  it++;
122  }
123  }
124 
125  data_points = std::move(massSpectrum);
126  return data_points;
127 }

References m_arbitrary_minimum_mz, m_arbitrary_range_between_isotopes, pappso::DataPoint::x, and pappso::DataPoint::y.

Member Data Documentation

◆ m_arbitrary_minimum_mz

double pappso::FilterTandemDeisotope::m_arbitrary_minimum_mz = 200.0
private

Definition at line 88 of file filtertandemremovec13.h.

Referenced by filter().

◆ m_arbitrary_range_between_isotopes

double pappso::FilterTandemDeisotope::m_arbitrary_range_between_isotopes = 0.95
private

Definition at line 87 of file filtertandemremovec13.h.

Referenced by filter().


The documentation for this class was generated from the following files:
pappso::FilterTandemDeisotope::m_arbitrary_range_between_isotopes
double m_arbitrary_range_between_isotopes
Definition: filtertandemremovec13.h:87
pappso::DataPoint::y
pappso_double y
Definition: datapoint.h:23
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition: massspectrum.h:89
pappso::DataPoint
Definition: datapoint.h:20
pappso::FilterTandemDeisotope::m_arbitrary_minimum_mz
double m_arbitrary_minimum_mz
Definition: filtertandemremovec13.h:88
pappso::DataPoint::x
pappso_double x
Definition: datapoint.h:22