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) <
73 codec_mass_matching.getPrecisionPtr()->getNominal())
74 {
75 m_isComplement = true;
76 }
77 else
78 {
79
80 if(antiMassDelta > 0)
81 {
82 antiAaCodeList = codec_mass_matching.getAaCodeFromMass(antiMassDelta);
83 }
84 }
85}
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:65
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 89 of file selfspectrumdatapoint.cpp.

93{
94
95 if(massDelta > 0)
96 {
97 std::vector<uint32_t> new_code_list =
98 codec_mass_matching.getAaCodeFromMassWearingModification(
99 massDelta, aa, quantifier);
100 std::copy(new_code_list.begin(),
101 new_code_list.end(),
102 std::back_inserter(aaCodeList));
103 }
104 if(antiMassDelta > 0)
105 {
106 std::vector<uint32_t> new_code_list =
107 codec_mass_matching.getAaCodeFromMassWearingModification(
108 antiMassDelta, aa, quantifier);
109 std::copy(new_code_list.begin(),
110 new_code_list.end(),
111 std::back_inserter(antiAaCodeList));
112 }
113}
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: