libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
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 (double mz_range_max=0.95, double minimum_mz=200.0)
 FilterTandemDeisotope (const FilterTandemDeisotope &other)
MassSpectrumfilter (MassSpectrum &data_points) const override
Public Member Functions inherited from pappso::MassSpectrumFilterInterface
virtual ~MassSpectrumFilterInterface ()

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.

first tandem filter is 0.95 (remove_isotopes(_s);)
second tandem filter is 1.5 (clean_isotopes(_s);)

Definition at line 57 of file filtertandemremovec13.h.

Constructor & Destructor Documentation

◆ FilterTandemDeisotope() [1/2]

FilterTandemDeisotope::FilterTandemDeisotope ( double mz_range_max = 0.95,
double minimum_mz = 200.0 )

◆ FilterTandemDeisotope() [2/2]

FilterTandemDeisotope::FilterTandemDeisotope ( const FilterTandemDeisotope & other)

Member Function Documentation

◆ filter()

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

Implements pappso::MassSpectrumFilterInterface.

Definition at line 50 of file filtertandemremovec13.cpp.

51{
52
53 MassSpectrum massSpectrum;
54
55 if(data_points.size() > 0)
56 {
57 // auto it_write = data_points.begin();
58 auto it_read = data_points.begin() + 1;
59 auto it_end = data_points.end();
60
61
62 DataPoint value_write = *data_points.begin();
63 double last_mz = value_write.x;
64 while(it_read != it_end)
65 {
66 if((it_read->x - last_mz) >= m_arbitrary_range_between_isotopes ||
67 it_read->x < m_arbitrary_minimum_mz)
68 {
69 massSpectrum.push_back(value_write);
70 value_write = *it_read;
71 last_mz = value_write.x;
72 }
73 else if(it_read->y > value_write.y)
74 {
75 value_write = *it_read;
76 }
77 it_read++;
78 }
79 massSpectrum.push_back(value_write);
80 }
81
82 data_points = std::move(massSpectrum);
83 return data_points;
84}
pappso_double x
Definition datapoint.h:24
pappso_double y
Definition datapoint.h:25

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 68 of file filtertandemremovec13.h.

Referenced by FilterTandemDeisotope(), FilterTandemDeisotope(), and filter().

◆ m_arbitrary_range_between_isotopes

double pappso::FilterTandemDeisotope::m_arbitrary_range_between_isotopes = 0.95
private

Definition at line 67 of file filtertandemremovec13.h.

Referenced by FilterTandemDeisotope(), FilterTandemDeisotope(), and filter().


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