libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::specself::SelfSpectrumDataPoint Struct Reference

#include <selfspectrumdatapoint.h>

Public Member Functions

void fillSelfSpectrumDataPoint (const pappso::AaStringCodeMassMatching &codec_mass_matching, const DataPoint &peak1, const DataPoint &peak2)
void fillAntiSpectrumDataPoint (double precursor_mass, const pappso::AaStringCodeMassMatching &codec_mass_matching, const DataPoint &peak1, const DataPoint &peak2)
void setVariableModification (const pappso::AaStringCodeMassMatching &codec_mass_matching, const Aa &aa, int quantifier)

Public Attributes

bool m_isComplement =false
double massDelta
double antiMassDelta
std::vector< uint32_t > aaCodeList
std::vector< uint32_t > antiAaCodeList

Detailed Description

Definition at line 38 of file selfspectrumdatapoint.h.

Member Function Documentation

◆ fillAntiSpectrumDataPoint()

void pappso::specself::SelfSpectrumDataPoint::fillAntiSpectrumDataPoint ( double precursor_mass,
const pappso::AaStringCodeMassMatching & codec_mass_matching,
const DataPoint & peak1,
const DataPoint & peak2 )

Definition at line 62 of file selfspectrumdatapoint.cpp.

67{
68 precursor_mass = precursor_mass + MHPLUS + MHPLUS;
69 antiMassDelta = (precursor_mass - peak1.x) - peak2.x;
70
71 m_isComplement = false;
72 if(std::abs(antiMassDelta) < codec_mass_matching.getPrecisionPtr()->getNominal())
73 {
74 m_isComplement = true;
75 }
76 else
77 {
78
79 if(antiMassDelta > 0)
80 {
81 antiAaCodeList = codec_mass_matching.getAaCodeFromMass(antiMassDelta);
82 }
83 }
84}
std::vector< uint32_t > getAaCodeFromMass(double mass) const
get amino acid string code from a single mass delta
virtual pappso_double getNominal() const final
Definition precision.cpp:73
const pappso_double MHPLUS(1.007276466879)

References antiAaCodeList, antiMassDelta, pappso::AaStringCodeMassMatching::getAaCodeFromMass(), pappso::PrecisionBase::getNominal(), pappso::AaStringCodeMassMatching::getPrecisionPtr(), m_isComplement, pappso::MHPLUS(), and pappso::DataPoint::x.

◆ fillSelfSpectrumDataPoint()

void pappso::specself::SelfSpectrumDataPoint::fillSelfSpectrumDataPoint ( const pappso::AaStringCodeMassMatching & codec_mass_matching,
const DataPoint & peak1,
const DataPoint & peak2 )

Definition at line 38 of file selfspectrumdatapoint.cpp.

42{
43
44 massDelta = peak1.x - peak2.x;
45
46 // qDebug() << massDelta;
47 if(massDelta > 0)
48 {
49 aaCodeList = codec_mass_matching.getAaCodeFromMass(massDelta);
50 }
51 // m_targetMzSum = m_precursorMass + pappso::MHPLUS + pappso::MHPLUS;
52 // double precusorBion = m_targetMzSum - pappso::MASSH2O - pappso::MPROTIUM;
53 // if peak2 is the other ion suite (Y <=> B)
54 antiMassDelta = 0;
55 antiAaCodeList.clear();
56
57 // qDebug();
58}

References aaCodeList, antiAaCodeList, antiMassDelta, pappso::AaStringCodeMassMatching::getAaCodeFromMass(), massDelta, and pappso::DataPoint::x.

◆ setVariableModification()

void pappso::specself::SelfSpectrumDataPoint::setVariableModification ( const pappso::AaStringCodeMassMatching & codec_mass_matching,
const Aa & aa,
int quantifier )

Definition at line 88 of file selfspectrumdatapoint.cpp.

90{
91
92 if(massDelta > 0)
93 {
94 std::vector<uint32_t> new_code_list =
95 codec_mass_matching.getAaCodeFromMassWearingModification(massDelta, aa, quantifier);
96 std::copy(new_code_list.begin(), new_code_list.end(), std::back_inserter(aaCodeList));
97 }
98 if(antiMassDelta > 0)
99 {
100 std::vector<uint32_t> new_code_list =
101 codec_mass_matching.getAaCodeFromMassWearingModification(antiMassDelta, aa, quantifier);
102 std::copy(new_code_list.begin(), new_code_list.end(), std::back_inserter(antiAaCodeList));
103 }
104}
std::vector< uint32_t > getAaCodeFromMassWearingModification(double mass, const Aa &aa, int quantifier) const
get amino acid string code from a single mass delta wearing a specific modification

References aaCodeList, antiAaCodeList, antiMassDelta, pappso::AaStringCodeMassMatching::getAaCodeFromMassWearingModification(), and massDelta.

Member Data Documentation

◆ aaCodeList

std::vector<uint32_t> pappso::specself::SelfSpectrumDataPoint::aaCodeList

Definition at line 59 of file selfspectrumdatapoint.h.

Referenced by fillSelfSpectrumDataPoint(), and setVariableModification().

◆ antiAaCodeList

std::vector<uint32_t> pappso::specself::SelfSpectrumDataPoint::antiAaCodeList

◆ antiMassDelta

double pappso::specself::SelfSpectrumDataPoint::antiMassDelta

◆ m_isComplement

bool pappso::specself::SelfSpectrumDataPoint::m_isComplement =false

Definition at line 56 of file selfspectrumdatapoint.h.

Referenced by fillAntiSpectrumDataPoint().

◆ massDelta

double pappso::specself::SelfSpectrumDataPoint::massDelta

Definition at line 57 of file selfspectrumdatapoint.h.

Referenced by fillSelfSpectrumDataPoint(), and setVariableModification().


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