Loading...
Searching...
No Matches
pappso::specpeptidoms::SpOMSSpectrum Class Reference

`#include <spomsspectrum.h>`

Inheritance diagram for pappso::specpeptidoms::SpOMSSpectrum:

## Public Member Functions

| SpOMSSpectrum (pappso::QualifiedMassSpectrum &qmass_spectrum, pappso::PrecisionPtr precision_ptr, const pappso::AaCode &aaCode)
| SpOMSSpectrum (const SpOMSSpectrum &other)
| SpOMSSpectrum (const SpOMSSpectrum &other, double precursor_mass_error)
| Returns a copy of the provided spectrum accounting for the provided precursor mass error.
virtual | ~SpOMSSpectrum ()
void | addAaPosition (uint8_t aa, const std::size_t r_peak, const std::size_t l_peak, double l_mass, bool l_support)
| Adds an amino acid position to the data structure.
const std::vector< AaPosition > & | getAaPositions (std::uint8_t aa_code) const
| Returns the list of aa_positions for a given amino acid code.
std::vector< AaPosition > | getAaPositions (std::uint8_t aa_code, std::vector< std::size_t > &peaks_to_remove) const
| Returns the list of aa_positions for a given amino acid, except those relying on provided peaks.
std::vector< double > | getMassList () const
| Returns the spectrum's list of masses.
specglob::ExperimentalSpectrumDataPointType | peakType (std::size_t indice) const
| Returns the type of one of the spectrum's peaks.
uint | getPrecursorCharge () const
| Returns the spectrum's precursor's charge.
double | getPrecursorMass () const
double | getMissingMass (std::size_t peak) const
| Returns the missing mass between a peak and the precursor's mass (shift at the end).
double | getMZShift (std::size_t l_peak, std::size_t r_peak) const
| Returns the mz difference between two peaks.
std::size_t | getComplementaryPeak (std::size_t peak) const

## Private Member Functions

void | preprocessSpectrum ()
| Preprocess the spectrum.
void | removeUnsupportedMasses ()
| Removes the unsupported peaks (without an amino acid to the left) from the spectrum.
uint32_t | computeCondition (const std::size_t l_peak, bool l_support) const
| Computes the "condition" integer, used to apply the three peaks rule.
void | addSupportedPeak (std::size_t peak)
| Add a peak to the supported peaks list.
void | correctPeakIndexes ()
| Reindexes the peaks after removal of the unsupported peaks.
void | fillComplementaryPeakIndexes ()
| For each point of the spectrum, indicate the index of its complementary peak;.

## Private Attributes

pappso::QualifiedMassSpectrum | m_qualifiedMassSpectrum
std::vector< std::shared_ptr< std::vector< AaPosition > > > | m_aapositions
pappso::PrecisionPtr | m_precision_ptr
std::vector< std::shared_ptr< std::vector< uint8_t > > > | m_supported_peaks
std::vector< int > | m_reindexed_peaks
const pappso::AaCode & | m_aaCode
std::vector< std::size_t > | m_complementary_peak_indexes
double | m_precursor_mass_error

## Detailed Description

Definition at line 68 of file spomsspectrum.h.

## Constructor & Destructor Documentation

## SpOMSSpectrum() [1/3]

pappso::specpeptidoms::SpOMSSpectrum::SpOMSSpectrum | ( | pappso::QualifiedMassSpectrum & | qmass_spectrum,
|  | pappso::PrecisionPtr | precision_ptr,
|  | const pappso::AaCode & | aaCode )

Default constructor

Parameters

  exp_spectrum | ExperimentalSpectrum to preprocess
  precision_ptr | Precision to use for preprocessing

Definition at line 45 of file spomsspectrum.cpp.

: std::vector<pappso::specglob::ExperimentalSpectrumDataPoint>(
specglob::ExperimentalSpectrum(qmass_spectrum, precision_ptr)),
m_qualifiedMassSpectrum(qmass_spectrum),
m_precision_ptr(precision_ptr),
m_aaCode(aaCode),
m_precursor_mass_error(0)
{
m_aapositions.reserve(m_aaCode.getSize());
for(std::size_t iter = 0; iter < m_aaCode.getSize(); iter++)
{
m_aapositions.push_back(std::make_shared<std::vector<AaPosition>>());
m_aapositions.back()->reserve(this->size() - 1);
}
m_supported_peaks.reserve(this->size());
m_supported_peaks.push_back(std::make_shared<std::vector<uint8_t>>());
m_reindexed_peaks.push_back(0);
for(std::size_t iter = 1; iter < this->size(); iter++)
{
m_supported_peaks.push_back(std::make_shared<std::vector<uint8_t>>());
m_reindexed_peaks.push_back(-1);
}
this->at(0).peak_mz = pappso::MHPLUS + 2 * pappso::MPROTIUM + pappso::MASSOXYGEN;
this->back().peak_mz = m_qualifiedMassSpectrum.getPrecursorMass() + pappso::MHPLUS;
preprocessSpectrum();
}
pappso::specpeptidoms::SpOMSSpectrum::preprocessSpectrum
void preprocessSpectrum()
Preprocess the spectrum.
Definition spomsspectrum.cpp:124
pappso::specpeptidoms::SpOMSSpectrum::m_supported_peaks
std::vector< std::shared_ptr< std::vector< uint8_t > > > m_supported_peaks
Definition spomsspectrum.h:161
pappso::specpeptidoms::SpOMSSpectrum::m_precursor_mass_error
double m_precursor_mass_error
Definition spomsspectrum.h:167
pappso::specpeptidoms::SpOMSSpectrum::m_precision_ptr
pappso::PrecisionPtr m_precision_ptr
Definition spomsspectrum.h:159
pappso::specpeptidoms::SpOMSSpectrum::m_qualifiedMassSpectrum
pappso::QualifiedMassSpectrum m_qualifiedMassSpectrum
Definition spomsspectrum.h:157
pappso::specpeptidoms::SpOMSSpectrum::m_aapositions
std::vector< std::shared_ptr< std::vector< AaPosition > > > m_aapositions
Definition spomsspectrum.h:158
pappso::specpeptidoms::SpOMSSpectrum::m_reindexed_peaks
std::vector< int > m_reindexed_peaks
Definition spomsspectrum.h:163
pappso::specpeptidoms::SpOMSSpectrum::m_aaCode
const pappso::AaCode & m_aaCode
Definition spomsspectrum.h:165
pappso::MHPLUS
const pappso_double MHPLUS(1.007276466879)
pappso::MPROTIUM
const pappso_double MPROTIUM(1.007825032241)
pappso::MASSOXYGEN
const pappso_double MASSOXYGEN(15.99491461956)

References m_aaCode, m_aapositions, m_precision_ptr, m_precursor_mass_error, m_qualifiedMassSpectrum, m_reindexed_peaks, m_supported_peaks, pappso::MASSOXYGEN(), pappso::MHPLUS(), pappso::MPROTIUM(), and preprocessSpectrum().

Referenced by SpOMSSpectrum(), and SpOMSSpectrum().

## SpOMSSpectrum() [2/3]

pappso::specpeptidoms::SpOMSSpectrum::SpOMSSpectrum | ( | const SpOMSSpectrum & | other | ) |

Copy constructor

Parameters

  other | SpOMSSpectrum to copy

Definition at line 74 of file spomsspectrum.cpp.

: std::vector<pappso::specglob::ExperimentalSpectrumDataPoint>(
pappso::specglob::ExperimentalSpectrum(other.m_qualifiedMassSpectrum, other.m_precision_ptr)),
m_qualifiedMassSpectrum(other.m_qualifiedMassSpectrum),
m_aapositions(other.m_aapositions),
m_precision_ptr(other.m_precision_ptr),
m_supported_peaks(other.m_supported_peaks),
m_reindexed_peaks(other.m_reindexed_peaks),
m_aaCode(other.m_aaCode),
m_complementary_peak_indexes(other.m_complementary_peak_indexes),
m_precursor_mass_error(other.m_precursor_mass_error)
{
}
pappso::specpeptidoms::SpOMSSpectrum::m_complementary_peak_indexes
std::vector< std::size_t > m_complementary_peak_indexes
Definition spomsspectrum.h:166

References SpOMSSpectrum(), m_aaCode, m_aapositions, m_complementary_peak_indexes, m_precision_ptr, m_precursor_mass_error, m_qualifiedMassSpectrum, m_reindexed_peaks, and m_supported_peaks.

## SpOMSSpectrum() [3/3]

pappso::specpeptidoms::SpOMSSpectrum::SpOMSSpectrum | ( | const SpOMSSpectrum & | other,
|  | double | precursor_mass_error )

Returns a copy of the provided spectrum accounting for the provided precursor mass error.

Post-processing constructor

Parameters

  other | SpOMSSpectrum to copy
  precursor_mass_error | precursor mass error to account for

Definition at line 88 of file spomsspectrum.cpp.

: std::vector<pappso::specglob::ExperimentalSpectrumDataPoint>(
pappso::specglob::ExperimentalSpectrum(
other.m_qualifiedMassSpectrum, other.m_precision_ptr, precursor_mass_error)),
m_qualifiedMassSpectrum(other.m_qualifiedMassSpectrum),
m_precision_ptr(other.m_precision_ptr),
m_aaCode(other.m_aaCode),
m_precursor_mass_error(precursor_mass_error)
{
m_aapositions.reserve(m_aaCode.getSize());
for(std::size_t iter = 0; iter < m_aaCode.getSize(); iter++)
{
m_aapositions.push_back(std::make_shared<std::vector<AaPosition>>());
m_aapositions.back()->reserve(this->size() - 1);
}
m_supported_peaks.reserve(this->size());
m_supported_peaks.push_back(std::make_shared<std::vector<uint8_t>>());
m_reindexed_peaks.push_back(0);
for(std::size_t iter = 1; iter < this->size(); iter++)
{
m_supported_peaks.push_back(std::make_shared<std::vector<uint8_t>>());
m_reindexed_peaks.push_back(-1);
}
this->at(0).peak_mz = pappso::MHPLUS + 2 * pappso::MPROTIUM + pappso::MASSOXYGEN;
this->back().peak_mz =
m_qualifiedMassSpectrum.getPrecursorMass() + pappso::MHPLUS + precursor_mass_error;
preprocessSpectrum();
}

References SpOMSSpectrum(), m_aaCode, m_aapositions, m_precision_ptr, m_precursor_mass_error, m_qualifiedMassSpectrum, m_reindexed_peaks, m_supported_peaks, pappso::MASSOXYGEN(), pappso::MHPLUS(), pappso::MPROTIUM(), and preprocessSpectrum().

## ~SpOMSSpectrum()

pappso::specpeptidoms::SpOMSSpectrum::~SpOMSSpectrum | ( |  | ) |

virtual

Destructor

Definition at line 118 of file spomsspectrum.cpp.

{
}

## Member Function Documentation

## addAaPosition()

void pappso::specpeptidoms::SpOMSSpectrum::addAaPosition | ( | uint8_t | aa,
|  | const std::size_t | r_peak,
|  | const std::size_t | l_peak,
|  | double | l_mass,
|  | bool | l_support )

Adds an amino acid position to the data structure.

Parameters

  aa | Amino acid to add to the data structure
  r_peak | index of the amino acid's right support peak
  l_peak | index of the amino acid's left support peak, if it is supported by an amino acid
  l_mass | mass of the amino acid's left support peak
  l_support | indicates whether the amino acid's left support peak if supported by an amino acid

Definition at line 257 of file spomsspectrum.cpp.

{
// aa=0 corresponds to no amino acid identified, thus aa is always >=1. We substract 1 to aa to
// avoid keeping an empty, useless vector.
m_aapositions.at(aa - 1)->push_back(
{r_peak, l_peak, l_mass, computeCondition(l_peak, l_support), l_support});
qDebug() << "l_peak" << l_peak << "r_peak" << r_peak << "l_mass" << l_mass << "l_support"
<< l_support << "condition" << computeCondition(l_peak, l_support);
}
pappso::specpeptidoms::SpOMSSpectrum::computeCondition
uint32_t computeCondition(const std::size_t l_peak, bool l_support) const
Computes the "condition" integer, used to apply the three peaks rule.
Definition spomsspectrum.cpp:269

References computeCondition(), and m_aapositions.

Referenced by preprocessSpectrum().

## addSupportedPeak()

void pappso::specpeptidoms::SpOMSSpectrum::addSupportedPeak | ( | std::size_t | peak | ) |

private

Add a peak to the supported peaks list.

Definition at line 374 of file spomsspectrum.cpp.

{
std::size_t counter = 0;
for(std::size_t iter = 0; iter < peak; iter++)
{
if(m_reindexed_peaks.at(iter) >= 0)
{
counter++;
}
}
m_reindexed_peaks.at(peak) = counter;
for(std::size_t iter = peak + 1; iter < m_reindexed_peaks.size(); iter++)
{
if(m_reindexed_peaks.at(iter) >= 0)
{
m_reindexed_peaks.at(iter)++;
}
}
}

References m_reindexed_peaks.

Referenced by preprocessSpectrum().

## computeCondition()

uint32_t pappso::specpeptidoms::SpOMSSpectrum::computeCondition | ( | const std::size_t | l_peak,
|  | bool | l_support ) const

private

Computes the "condition" integer, used to apply the three peaks rule.

Definition at line 269 of file spomsspectrum.cpp.

{
uint32_t condition;
if(!l_support)
{
condition = 1;
}
else if(l_peak == 0)
{
condition = 2;
}
else
{
condition = 0;
for(std::vector<uint8_t>::iterator aa = m_supported_peaks.at(l_peak)->begin();
aa != m_supported_peaks.at(l_peak)->end();
aa++)
{
condition += 2 << *(aa);
}
}
return condition;
}
pappso::masschroq::PeakQualityCategory::aa
@ aa
best possible : more than one direct MS2 fragmentation in same MSRUN
Definition types.h:45

References m_supported_peaks.

Referenced by addAaPosition().

## correctPeakIndexes()

void pappso::specpeptidoms::SpOMSSpectrum::correctPeakIndexes | ( |  | ) |

private

Reindexes the peaks after removal of the unsupported peaks.

Definition at line 395 of file spomsspectrum.cpp.

{
for(auto aa = m_aapositions.begin(); aa != m_aapositions.end(); aa++)
{
for(auto aap = aa->get()->begin(); aap != aa->get()->end(); aap++)
{
aap->l_peak = m_reindexed_peaks.at(aap->l_peak);
aap->r_peak = m_reindexed_peaks.at(aap->r_peak);
}
}
}

References m_aapositions, and m_reindexed_peaks.

Referenced by preprocessSpectrum().

## fillComplementaryPeakIndexes()

void pappso::specpeptidoms::SpOMSSpectrum::fillComplementaryPeakIndexes | ( |  | ) |

private

For each point of the spectrum, indicate the index of its complementary peak;.

Definition at line 408 of file spomsspectrum.cpp.

{
std::size_t left_index, right_index;
m_complementary_peak_indexes.reserve(this->size());
while(m_complementary_peak_indexes.size() < this->size())
{
m_complementary_peak_indexes.push_back(0);
}
left_index = 0;
right_index = this->size() - 1;
double comp_mass = m_qualifiedMassSpectrum.getPrecursorMass() + 2 * MHPLUS;
while(left_index < right_index)
{
pappso::MzRange mz_range(comp_mass - this->at(left_index).peak_mz, m_precision_ptr);
if(mz_range.contains(this->at(right_index).peak_mz))
{
m_complementary_peak_indexes.at(left_index) = right_index;
m_complementary_peak_indexes.at(right_index) = left_index;
qDebug() << left_index << right_index;
}
if(comp_mass - this->at(left_index).peak_mz - this->at(right_index).peak_mz >= 0)
{
left_index++;
}
else
{
right_index--;
}
}
}

References pappso::MzRange::contains(), m_complementary_peak_indexes, m_precision_ptr, m_qualifiedMassSpectrum, and pappso::MHPLUS().

Referenced by preprocessSpectrum().

## getAaPositions() [1/2]

const std::vector< pappso::specpeptidoms::AaPosition > & pappso::specpeptidoms::SpOMSSpectrum::getAaPositions | ( | std::uint8_t | aa_code | ) | const

Returns the list of aa_positions for a given amino acid code.

Parameters

  aa_code | Amino acid code for which to retrieve positions

Definition at line 296 of file spomsspectrum.cpp.

{
return *m_aapositions.at(aa_code - 1);
}

References m_aapositions.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::correctAlign(), pappso::specpeptidoms::SemiGlobalAlignment::fastAlign(), and pappso::specpeptidoms::SemiGlobalAlignment::preciseAlign().

## getAaPositions() [2/2]

std::vector< pappso::specpeptidoms::AaPosition > pappso::specpeptidoms::SpOMSSpectrum::getAaPositions | ( | std::uint8_t | aa_code,
|  | std::vector< std::size_t > & | peaks_to_remove ) const

Returns the list of aa_positions for a given amino acid, except those relying on provided peaks.

Definition at line 303 of file spomsspectrum.cpp.

{
std::vector<AaPosition> aa_positions;
for(auto aap : *m_aapositions.at(aa_code - 1))
{
if(std::find(peaks_to_remove.begin(), peaks_to_remove.end(), aap.r_peak) ==
peaks_to_remove.end())
{
aa_positions.push_back(aap);
}
}
return aa_positions;
}

References m_aapositions.

## getComplementaryPeak()

std::size_t pappso::specpeptidoms::SpOMSSpectrum::getComplementaryPeak | ( | std::size_t | peak | ) | const

Definition at line 442 of file spomsspectrum.cpp.

{
return m_complementary_peak_indexes.at(peak);
}

References m_complementary_peak_indexes.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::correctAlign(), and pappso::specpeptidoms::SemiGlobalAlignment::preciseAlign().

## getMassList()

std::vector< double > pappso::specpeptidoms::SpOMSSpectrum::getMassList | ( |  | ) | const

Returns the spectrum's list of masses.

Definition at line 319 of file spomsspectrum.cpp.

{
std::vector<double> mass_list;
for(const specglob::ExperimentalSpectrumDataPoint &n : *this)
{
mass_list.push_back(n.peak_mz);
}
return mass_list;
}

References pappso::specglob::ExperimentalSpectrumDataPoint::peak_mz.

Referenced by preprocessSpectrum().

## getMissingMass()

double pappso::specpeptidoms::SpOMSSpectrum::getMissingMass | ( | std::size_t | peak | ) | const

Returns the missing mass between a peak and the precursor's mass (shift at the end).

Definition at line 362 of file spomsspectrum.cpp.

{
if(peak > size())
{
throw pappso::ExceptionOutOfRange(
QObject::tr("getMissingMass : peak %1 greater than size %2").arg(peak).arg(size()));
}
return this->m_qualifiedMassSpectrum.getPrecursorMass() - m_precursor_mass_error -
this->at(peak).peak_mz + MHPLUS;
}

References m_precursor_mass_error, m_qualifiedMassSpectrum, and pappso::MHPLUS().

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::perfectShiftPossibleEnd(), pappso::specpeptidoms::SemiGlobalAlignment::saveBestAlignment(), and pappso::specpeptidoms::SemiGlobalAlignment::updateAlignmentMatrix().

## getMZShift()

double pappso::specpeptidoms::SpOMSSpectrum::getMZShift | ( | std::size_t | l_peak,
|  | std::size_t | r_peak ) const

Returns the mz difference between two peaks.

Parameters

  l_peak | left peak
  r_peak | right peak

Definition at line 348 of file spomsspectrum.cpp.

{
if(std::max(r_peak, l_peak) > size())
{
throw pappso::ExceptionOutOfRange(
QObject::tr("getMZShift : l_peak %1 or r_peak %2 greater than size %3")
.arg(l_peak)
.arg(r_peak)
.arg(size()));
}
return this->at(r_peak).peak_mz - this->at(l_peak).peak_mz;
}

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::perfectShiftPossible(), pappso::specpeptidoms::SemiGlobalAlignment::perfectShiftPossibleFrom0(), and pappso::specpeptidoms::SemiGlobalAlignment::saveBestAlignment().

## getPrecursorCharge()

uint pappso::specpeptidoms::SpOMSSpectrum::getPrecursorCharge | ( |  | ) | const

Returns the spectrum's precursor's charge.

Definition at line 336 of file spomsspectrum.cpp.

{
return m_qualifiedMassSpectrum.getPrecursorCharge();
}

References m_qualifiedMassSpectrum.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::correctAlign().

## getPrecursorMass()

double pappso::specpeptidoms::SpOMSSpectrum::getPrecursorMass | ( |  | ) | const

Definition at line 341 of file spomsspectrum.cpp.

{
return m_qualifiedMassSpectrum.getPrecursorMass();
}

References m_qualifiedMassSpectrum.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::saveBestAlignment().

## peakType()

pappso::specglob::ExperimentalSpectrumDataPointType pappso::specpeptidoms::SpOMSSpectrum::peakType | ( | std::size_t | indice | ) | const

Returns the type of one of the spectrum's peaks.

Parameters

  indice | Peak index to be identified

Definition at line 330 of file spomsspectrum.cpp.

{
return this->at(indice).type;
}

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::updateAlignmentMatrix().

## preprocessSpectrum()

void pappso::specpeptidoms::SpOMSSpectrum::preprocessSpectrum | ( |  | ) |

private

Preprocess the spectrum.

Definition at line 124 of file spomsspectrum.cpp.

{
// bool found;
uint8_t aa;
std::vector<double>::iterator iter1, iter2;
std::size_t peak1, peak2, next_l_peak;
std::vector<double> mass_list = getMassList();
peak1 = -1;
for(iter1 = mass_list.begin(); iter1 != mass_list.end(); iter1++)
{
peak1++;
peak2 = peak1;
for(iter2 = iter1 + 1; iter2 != mass_list.end(); iter2++)
{
peak2++;
aa = m_aaCode.getAaCodeByMass(*(iter2) - *(iter1), m_precision_ptr);
if(aa != 0)
{
next_l_peak = 0;
for(std::size_t iter = 1; iter < peak1;
iter++) // Search of the closer supported left peak.
// Possible optimization => search from the right
{
if(m_reindexed_peaks.at(iter) >= 0)
{
next_l_peak = iter;
}
}
if(m_reindexed_peaks.at(peak2) == -1)
{
addSupportedPeak(peak2);
m_supported_peaks.at(peak2)->push_back(aa);
}
else
{
auto it = std::find(
m_supported_peaks.at(peak2)->begin(), m_supported_peaks.at(peak2)->end(), aa);
if(it == m_supported_peaks.at(peak2)->end())
{
m_supported_peaks.at(peak2)->push_back(aa);
}
}
if(m_reindexed_peaks.at(peak1) >= 0)
{
addAaPosition(aa, peak2, peak1, *(iter1), true);
}
else
{
addAaPosition(aa, peak2, next_l_peak, *(iter1), false);
}
}
}
}
removeUnsupportedMasses();
correctPeakIndexes();
for(uint8_t aa = 1; aa < m_aaCode.getSize() + 1; ++aa)
{
qDebug() << m_aaCode.getAa(aa).getLetter();
for(auto iter = m_aapositions.at(aa - 1)->begin(); iter != m_aapositions.at(aa - 1)->end();
++iter)
{
qDebug() << iter->l_peak << this->at(iter->l_peak).peak_mz << iter->r_peak
<< this->at(iter->r_peak).peak_mz << iter->l_support << iter->condition;
}
}
// std::size_t i = 0;
// for(auto &data_point : *this)
// {
// data_point.indice = i;
// i++;
// }
fillComplementaryPeakIndexes();
}
pappso::specpeptidoms::SpOMSSpectrum::removeUnsupportedMasses
void removeUnsupportedMasses()
Removes the unsupported peaks (without an amino acid to the left) from the spectrum.
Definition spomsspectrum.cpp:240
pappso::specpeptidoms::SpOMSSpectrum::addAaPosition
void addAaPosition(uint8_t aa, const std::size_t r_peak, const std::size_t l_peak, double l_mass, bool l_support)
Adds an amino acid position to the data structure.
Definition spomsspectrum.cpp:257
pappso::specpeptidoms::SpOMSSpectrum::correctPeakIndexes
void correctPeakIndexes()
Reindexes the peaks after removal of the unsupported peaks.
Definition spomsspectrum.cpp:395
pappso::specpeptidoms::SpOMSSpectrum::addSupportedPeak
void addSupportedPeak(std::size_t peak)
Add a peak to the supported peaks list.
Definition spomsspectrum.cpp:374
pappso::specpeptidoms::SpOMSSpectrum::fillComplementaryPeakIndexes
void fillComplementaryPeakIndexes()
For each point of the spectrum, indicate the index of its complementary peak;.
Definition spomsspectrum.cpp:408
pappso::specpeptidoms::SpOMSSpectrum::getMassList
std::vector< double > getMassList() const
Returns the spectrum's list of masses.
Definition spomsspectrum.cpp:319

References addAaPosition(), addSupportedPeak(), correctPeakIndexes(), fillComplementaryPeakIndexes(), getMassList(), m_aaCode, m_aapositions, m_precision_ptr, m_reindexed_peaks, m_supported_peaks, and removeUnsupportedMasses().

Referenced by SpOMSSpectrum(), and SpOMSSpectrum().

## removeUnsupportedMasses()

void pappso::specpeptidoms::SpOMSSpectrum::removeUnsupportedMasses | ( |  | ) |

private

Removes the unsupported peaks (without an amino acid to the left) from the spectrum.

Definition at line 240 of file spomsspectrum.cpp.

{
std::vector<specglob::ExperimentalSpectrumDataPoint> kept_peaks;
for(std::vector<specglob::ExperimentalSpectrumDataPoint>::iterator iter = this->begin();
iter != this->end();
iter++)
{
if(m_reindexed_peaks.at(iter->indice) >= 0)
{
kept_peaks.push_back(*iter);
}
}
this->clear();
this->assign(kept_peaks.begin(), kept_peaks.end());
}

References m_reindexed_peaks.

Referenced by preprocessSpectrum().

## Member Data Documentation

## m_aaCode

const pappso::AaCode& pappso::specpeptidoms::SpOMSSpectrum::m_aaCode

private

Definition at line 165 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), and preprocessSpectrum().

## m_aapositions

std::vector<std::shared_ptr<std::vector<AaPosition> > > pappso::specpeptidoms::SpOMSSpectrum::m_aapositions

private

Definition at line 158 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), addAaPosition(), correctPeakIndexes(), getAaPositions(), getAaPositions(), and preprocessSpectrum().

## m_complementary_peak_indexes

std::vector<std::size_t> pappso::specpeptidoms::SpOMSSpectrum::m_complementary_peak_indexes

private

Definition at line 166 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), fillComplementaryPeakIndexes(), and getComplementaryPeak().

## m_precision_ptr

pappso::PrecisionPtr pappso::specpeptidoms::SpOMSSpectrum::m_precision_ptr

private

Definition at line 159 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), fillComplementaryPeakIndexes(), and preprocessSpectrum().

## m_precursor_mass_error

double pappso::specpeptidoms::SpOMSSpectrum::m_precursor_mass_error

private

Definition at line 167 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), and getMissingMass().

## m_qualifiedMassSpectrum

pappso::QualifiedMassSpectrum pappso::specpeptidoms::SpOMSSpectrum::m_qualifiedMassSpectrum

private

Definition at line 157 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), fillComplementaryPeakIndexes(), getMissingMass(), getPrecursorCharge(), and getPrecursorMass().

## m_reindexed_peaks

std::vector<int> pappso::specpeptidoms::SpOMSSpectrum::m_reindexed_peaks

private

Definition at line 163 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), addSupportedPeak(), correctPeakIndexes(), preprocessSpectrum(), and removeUnsupportedMasses().

## m_supported_peaks

std::vector<std::shared_ptr<std::vector<uint8_t> > > pappso::specpeptidoms::SpOMSSpectrum::m_supported_peaks

private

Definition at line 161 of file spomsspectrum.h.

Referenced by SpOMSSpectrum(), SpOMSSpectrum(), SpOMSSpectrum(), computeCondition(), and preprocessSpectrum().

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

- pappsomspp/core/processing/specpeptidoms/spomsspectrum.h
- pappsomspp/core/processing/specpeptidoms/spomsspectrum.cpp