libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::specpeptidoms::Alignment Struct Reference

#include <semiglobalalignment.h>

Public Member Functions

void reset ()
 reinitialize to default score_values
QString getPeptideString (const QString &protein_sequence) const
 convenient function to get peptide sequence from location
double getNonAlignedMass () const
 convenient function to get the remaining non explained mass shift
std::size_t getPositionStart () const
 get position of start on the protein sequence

Public Attributes

std::vector< std::size_t > peaks
PeptideModel m_peptideModel
int score = 0
double begin_shift = 0.0
double end_shift = 0.0
std::vector< double > shifts
std::size_t SPC = 0
std::size_t beginning = 0
std::size_t end = 0

Detailed Description

Definition at line 56 of file semiglobalalignment.h.

Member Function Documentation

◆ getNonAlignedMass()

double pappso::specpeptidoms::Alignment::getNonAlignedMass ( ) const

convenient function to get the remaining non explained mass shift

non explained mass delta between the peptide chemical formula and the observed experimental spectrum precursor

Definition at line 65 of file semiglobalalignment.cpp.

66{
67 double sum_of_elems = std::accumulate(shifts.begin(), shifts.end(), 0);
68 return begin_shift + sum_of_elems + end_shift;
69}

References begin_shift, end_shift, and shifts.

Referenced by pappso::cbor::psm::PsmSpecPeptidOmsScan::storeAlignment().

◆ getPeptideString()

QString pappso::specpeptidoms::Alignment::getPeptideString ( const QString & protein_sequence) const

convenient function to get peptide sequence from location

Definition at line 59 of file semiglobalalignment.cpp.

60{
61 return protein_sequence.mid(beginning, end - beginning);
62}

References beginning, and end.

◆ getPositionStart()

std::size_t pappso::specpeptidoms::Alignment::getPositionStart ( ) const

get position of start on the protein sequence

Definition at line 73 of file semiglobalalignment.cpp.

74{
75 return beginning;
76}

References beginning.

Referenced by pappso::cbor::psm::PsmSpecPeptidOmsScan::storeAlignment().

◆ reset()

void pappso::specpeptidoms::Alignment::reset ( )

reinitialize to default score_values

Definition at line 44 of file semiglobalalignment.cpp.

45{
46 peaks.clear();
47 m_peptideModel.reset();
48 score = 0;
49 begin_shift = 0.0;
50 end_shift = 0.0;
51 shifts.clear();
52 SPC = 0;
53 beginning = 0;
54 end = 0;
55}
std::vector< std::size_t > peaks

References begin_shift, beginning, end, end_shift, m_peptideModel, peaks, score, shifts, and SPC.

Member Data Documentation

◆ begin_shift

◆ beginning

std::size_t pappso::specpeptidoms::Alignment::beginning = 0

◆ end

◆ end_shift

◆ m_peptideModel

◆ peaks

std::vector<std::size_t> pappso::specpeptidoms::Alignment::peaks

Definition at line 77 of file semiglobalalignment.h.

Referenced by reset().

◆ score

int pappso::specpeptidoms::Alignment::score = 0

◆ shifts

std::vector<double> pappso::specpeptidoms::Alignment::shifts

◆ SPC

std::size_t pappso::specpeptidoms::Alignment::SPC = 0

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