libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::specglob::PeptideSpectrum Class Reference

#include <peptidespectrum.h>

Inheritance diagram for pappso::specglob::PeptideSpectrum:

Public Member Functions

 PeptideSpectrum (const pappso::PeptideSp peptide_sp)
 PeptideSpectrum (const PeptideSpectrum &other)
virtual ~PeptideSpectrum ()
std::vector< double > getMassList () const
pappso::PeptideSp getPeptideSp () const

Private Attributes

pappso::PeptideSp msp_peptide

Detailed Description

Todo
write docs

Definition at line 62 of file peptidespectrum.h.

Constructor & Destructor Documentation

◆ PeptideSpectrum() [1/2]

pappso::specglob::PeptideSpectrum::PeptideSpectrum ( const pappso::PeptideSp peptide_sp)

Default constructor

Definition at line 46 of file peptidespectrum.cpp.

47 : std::vector<PeptideSpectrumDataPoint>()
48{
49
50 if(peptide_sp.get()->size() < 2)
51 {
52 throw pappso::PappsoException(
53 QObject::tr("PeptideSpectrum::PeptideSpectrum failed : peptide %1 is too small")
54 .arg(peptide_sp.get()->toProForma()));
55 }
57 msp_peptide = peptide_sp;
58 std::list<Enums::PeptideIon> ion_list;
59 ion_list.push_back(ion_type);
60
61
62 pappso::PeptideFragmentIonListBase fragmented_ion_list(msp_peptide, ion_list);
63
64 std::list<pappso::PeptideFragmentIonSp> peptide_ion_list =
65 fragmented_ion_list.getPeptideFragmentIonSp(Enums::PeptideIon::b);
66
67 push_back({pappso::MHPLUS, 0});
68 // qDebug() << pappso::PeptideRawFragmentMasses::getDeltaMass(ion_type);
69 for(auto &peptide_ion : peptide_ion_list)
70 {
71 push_back({peptide_ion.get()->getMz(1), 0});
72 }
73 push_back({(msp_peptide.get()->getMz(1) - pappso::MASSH2O +
75 0});
76 for(std::size_t i = 1; i < size(); i++)
77 {
78 at(i).diff_mz = (at(i).mz - at(i - 1).mz);
79 }
80}
static pappso_double getDeltaMass(Enums::PeptideIon ion_type)
PeptideIon
Enums::PeptideIon enum defines all types of ions (Nter or Cter).
Definition types.h:286
@ b
Nter acylium ions.
Definition types.h:287
const pappso_double MHPLUS(1.007276466879)
const pappso_double MASSH2O((MPROTIUM *2)+MASSOXYGEN)

References pappso::Enums::b, pappso::PeptideRawFragmentMasses::getDeltaMass(), pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp(), pappso::MASSH2O(), pappso::MHPLUS(), and msp_peptide.

Referenced by PeptideSpectrum().

◆ PeptideSpectrum() [2/2]

pappso::specglob::PeptideSpectrum::PeptideSpectrum ( const PeptideSpectrum & other)

Copy constructor

Parameters
otherTODO

Definition at line 82 of file peptidespectrum.cpp.

83 : std::vector<PeptideSpectrumDataPoint>(other)
84{
85 msp_peptide = other.msp_peptide;
86}

References PeptideSpectrum(), and msp_peptide.

◆ ~PeptideSpectrum()

pappso::specglob::PeptideSpectrum::~PeptideSpectrum ( )
virtual

Destructor

Definition at line 88 of file peptidespectrum.cpp.

89{
90}

Member Function Documentation

◆ getMassList()

std::vector< double > pappso::specglob::PeptideSpectrum::getMassList ( ) const

Definition at line 93 of file peptidespectrum.cpp.

94{
95 std::vector<double> mass_list;
96 for(const PeptideSpectrumDataPoint &n : *this)
97 {
98 mass_list.push_back(n.mz);
99 };
100
101 return mass_list;
102}

References pappso::specglob::PeptideSpectrumDataPoint::mz.

◆ getPeptideSp()

pappso::PeptideSp pappso::specglob::PeptideSpectrum::getPeptideSp ( ) const

Definition at line 105 of file peptidespectrum.cpp.

106{
107 return msp_peptide;
108}

References msp_peptide.

Referenced by pappso::specglob::SpectralAlignment::fillMatricesWithScores().

Member Data Documentation

◆ msp_peptide

pappso::PeptideSp pappso::specglob::PeptideSpectrum::msp_peptide
private

Definition at line 87 of file peptidespectrum.h.

Referenced by PeptideSpectrum(), PeptideSpectrum(), and getPeptideSp().


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