Loading...
Searching...
No Matches
pappso::FilterRemoveC13 Class Reference

`#include <filterremovec13.h>`

Inheritance diagram for pappso::FilterRemoveC13:

## Public Member Functions

| FilterRemoveC13 (PrecisionPtr precision_ptr)
| FilterRemoveC13 (const FilterRemoveC13 &other)
virtual | ~FilterRemoveC13 ()
Trace & | filter (Trace &data_points) const override
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Private Member Functions

bool | notExcluded (std::vector< std::pair< double, double > > &exclusionMassMap, double mass) const
void | addExclusionMap (std::vector< std::pair< double, double > > &exclusionMassMap, double mass) const

## Private Attributes

double | m_diffC12C13_z1
double | m_diffC12C13_z2
PrecisionPtr | m_precisionPtr

## Detailed Description

Definition at line 44 of file filterremovec13.h.

## Constructor & Destructor Documentation

## FilterRemoveC13() [1/2]

FilterRemoveC13::FilterRemoveC13 | ( | PrecisionPtr | precision_ptr | ) |

Default constructor

Definition at line 33 of file filterremovec13.cpp.

: m_precisionPtr(precision_ptr)
{
m_diffC12C13_z1 = DIFFC12C13;
m_diffC12C13_z2 = DIFFC12C13 / 2;
}
pappso::FilterRemoveC13::m_diffC12C13_z2
double m_diffC12C13_z2
Definition filterremovec13.h:75
pappso::FilterRemoveC13::m_diffC12C13_z1
double m_diffC12C13_z1
Definition filterremovec13.h:74
pappso::FilterRemoveC13::m_precisionPtr
PrecisionPtr m_precisionPtr
Definition filterremovec13.h:76
pappso::DIFFC12C13
const pappso_double DIFFC12C13(1.0033548378)

References pappso::DIFFC12C13(), m_diffC12C13_z1, m_diffC12C13_z2, and m_precisionPtr.

Referenced by FilterRemoveC13().

## FilterRemoveC13() [2/2]

FilterRemoveC13::FilterRemoveC13 | ( | const FilterRemoveC13 & | other | ) |

Copy constructor

Parameters

  other | TODO

Definition at line 39 of file filterremovec13.cpp.

: m_precisionPtr(other.m_precisionPtr)
{
m_diffC12C13_z1 = DIFFC12C13;
m_diffC12C13_z2 = DIFFC12C13 / 2;
}

References FilterRemoveC13(), pappso::DIFFC12C13(), m_diffC12C13_z1, m_diffC12C13_z2, and m_precisionPtr.

## ~FilterRemoveC13()

FilterRemoveC13::~FilterRemoveC13 | ( |  | ) |

virtual

Destructor

Definition at line 46 of file filterremovec13.cpp.

{
}

## Member Function Documentation

## addExclusionMap()

void pappso::FilterRemoveC13::addExclusionMap | ( | std::vector< std::pair< double, double > > & | exclusionMassMap,
|  | double | mass ) const

private

Definition at line 92 of file filterremovec13.cpp.

{
MzRange range1(mass + m_diffC12C13_z1, m_precisionPtr);
exclusionMassMap.push_back(std::pair<double, double>(range1.lower(), range1.upper()));
MzRange range2(mass + m_diffC12C13_z2, m_precisionPtr);
exclusionMassMap.push_back(std::pair<double, double>(range2.lower(), range2.upper()));
}

References pappso::MzRange::lower(), m_diffC12C13_z1, m_diffC12C13_z2, m_precisionPtr, and pappso::MzRange::upper().

Referenced by filter().

## filter()

Trace & FilterRemoveC13::filter | ( | Trace & | data_points | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 51 of file filterremovec13.cpp.

{
std::vector<std::pair<double, double>> exclusionMassMap;
// qDebug() << data_points.size();
std::sort(data_points.begin(), data_points.end(), [](const DataPoint &a, const DataPoint &b) {
return (a.y > b.y);
});
Trace new_trace;
for(auto &data_point : data_points)
{
if(notExcluded(exclusionMassMap, data_point.x))
{
new_trace.push_back(data_point);
}
addExclusionMap(exclusionMassMap, data_point.x);
}
new_trace.sortX();
// qDebug() << new_trace.size();
data_points = std::move(new_trace);
// qDebug() << data_points.size();
return data_points;
}
pappso::FilterRemoveC13::notExcluded
bool notExcluded(std::vector< std::pair< double, double > > &exclusionMassMap, double mass) const
Definition filterremovec13.cpp:78
pappso::FilterRemoveC13::addExclusionMap
void addExclusionMap(std::vector< std::pair< double, double > > &exclusionMassMap, double mass) const
Definition filterremovec13.cpp:92
pappso::Trace::sortX
void sortX(Enums::SortOrder sort_order=Enums::SortOrder::ascending)
Definition trace.cpp:1071
pappso::PeptideIonNter::a
@ a
Definition peptide.h:77
pappso::PeptideIonNter::b
@ b
Definition peptide.h:74

References pappso::a, addExclusionMap(), pappso::b, notExcluded(), and pappso::Trace::sortX().

## notExcluded()

bool pappso::FilterRemoveC13::notExcluded | ( | std::vector< std::pair< double, double > > & | exclusionMassMap,
|  | double | mass ) const

private

Definition at line 78 of file filterremovec13.cpp.

{
for(auto &mass_range : exclusionMassMap)
{
if((mass_range.first <= mass) && (mass_range.second >= mass))
{
return false;
}
}
return true;
}

Referenced by filter().

## Member Data Documentation

## m_diffC12C13_z1

double pappso::FilterRemoveC13::m_diffC12C13_z1

private

Definition at line 74 of file filterremovec13.h.

Referenced by FilterRemoveC13(), FilterRemoveC13(), and addExclusionMap().

## m_diffC12C13_z2

double pappso::FilterRemoveC13::m_diffC12C13_z2

private

Definition at line 75 of file filterremovec13.h.

Referenced by FilterRemoveC13(), FilterRemoveC13(), and addExclusionMap().

## m_precisionPtr

PrecisionPtr pappso::FilterRemoveC13::m_precisionPtr

private

Definition at line 76 of file filterremovec13.h.

Referenced by FilterRemoveC13(), FilterRemoveC13(), and addExclusionMap().

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

- pappsomspp/core/processing/filters/filterremovec13.h
- pappsomspp/core/processing/filters/filterremovec13.cpp