libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::PeptideInterface Class Referenceabstract

#include <peptideinterface.h>

Inheritance diagram for pappso::PeptideInterface:
pappso::Ion pappso::AtomNumberInterface pappso::Peptide pappso::PeptideFragment pappso::PeptideFragmentIon pappso::PeptideNaturalIsotope

Public Member Functions

virtual const QString getSequence () const =0
 amino acid sequence without modification
 
virtual bool isPalindrome () const =0
 tells if the peptide sequence is a palindrome
 
virtual const QString getSequenceLi () const
 amino acid sequence without modification where L are replaced by I
 
virtual unsigned int size () const =0
 
virtual const QString getName () const
 
virtual const ChemicalFormula getChemicalFormulaCharge (unsigned int charge) const
 
virtual const QString getFormula (unsigned int charge) const final
 
virtual bool matchPeak (PrecisionPtr precision, pappso_double peak_mz, unsigned int charge) const final
 tells if the peptide m/z matches a given experimental mass
 
- Public Member Functions inherited from pappso::Ion
 Ion ()
 
 ~Ion ()
 
virtual pappso_double getMass () const =0
 
virtual pappso_double getMz (unsigned int charge) const final
 
- Public Member Functions inherited from pappso::AtomNumberInterface
virtual int getNumberOfAtom (Enums::AtomIsotopeSurvey atom) const =0
 get the number of atom C, O, N, H in the molecule
 
virtual int getNumberOfIsotope (Enums::Isotope isotope) const =0
 get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
 
virtual const ChemicalFormula getChemicalFormula () const
 

Detailed Description

Definition at line 43 of file peptideinterface.h.

Member Function Documentation

◆ getChemicalFormulaCharge()

const pappso::ChemicalFormula pappso::PeptideInterface::getChemicalFormulaCharge ( unsigned int charge) const
virtual

Reimplemented in pappso::Peptide.

Definition at line 89 of file peptideinterface.cpp.

90{
91 pappso::ChemicalFormula formula(*this);
92
93 formula.addIsotopeCount({Enums::Isotope::H, (std::int16_t)charge});
94
95 return formula;
96}

References pappso::ChemicalFormula::addIsotopeCount(), and pappso::Enums::H.

Referenced by pappso::Peptide::getChemicalFormulaCharge().

◆ getFormula()

const QString pappso::PeptideInterface::getFormula ( unsigned int charge) const
finalvirtual

Definition at line 37 of file peptideinterface.cpp.

38{
39 QString carbon(QString("C %1").arg(this->getNumberOfAtom(Enums::AtomIsotopeSurvey::C) -
42 {
43 carbon.append(QString(" (13)C %1").arg(this->getNumberOfIsotope(Enums::Isotope::C13)));
44 }
45 QString hydrogen(QString("H %1").arg(this->getNumberOfAtom(Enums::AtomIsotopeSurvey::H) + charge -
48 {
49 hydrogen.append(QString(" (2)H %1").arg(this->getNumberOfIsotope(Enums::Isotope::H2)));
50 }
51 QString oxygen(QString("O %1").arg(this->getNumberOfAtom(Enums::AtomIsotopeSurvey::O) -
55 {
56 oxygen.append(QString(" (17)O %1").arg(this->getNumberOfIsotope(Enums::Isotope::O17)));
57 }
59 {
60 oxygen.append(QString(" (18)O %1").arg(this->getNumberOfIsotope(Enums::Isotope::O18)));
61 }
62 QString nitrogen(QString("N %1").arg(this->getNumberOfAtom(Enums::AtomIsotopeSurvey::N) -
65 {
66 nitrogen.append(QString(" (15)N %1").arg(this->getNumberOfIsotope(Enums::Isotope::N15)));
67 }
68
69 QString sulfur(QString("S %1").arg(
73 {
74 sulfur.append(QString(" (33)S %1").arg(this->getNumberOfIsotope(Enums::Isotope::S33)));
75 }
77 {
78 sulfur.append(QString(" (34)S %1").arg(this->getNumberOfIsotope(Enums::Isotope::S34)));
79 }
81 {
82 sulfur.append(QString(" (36)S %1").arg(this->getNumberOfIsotope(Enums::Isotope::S36)));
83 }
84 return QString("%1 %2 %3 %4 %5").arg(carbon).arg(hydrogen).arg(oxygen).arg(nitrogen).arg(sulfur);
85}
virtual int getNumberOfIsotope(Enums::Isotope isotope) const =0
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
virtual int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const =0
get the number of atom C, O, N, H in the molecule

References pappso::Enums::C, pappso::Enums::C13, pappso::AtomNumberInterface::getNumberOfAtom(), pappso::AtomNumberInterface::getNumberOfIsotope(), pappso::Enums::H, pappso::Enums::H2, pappso::Enums::N, pappso::Enums::N15, pappso::Enums::O, pappso::Enums::O17, pappso::Enums::O18, pappso::Enums::S, pappso::Enums::S33, pappso::Enums::S34, and pappso::Enums::S36.

◆ getName()

virtual const QString pappso::PeptideInterface::getName ( ) const
inlinevirtual

Reimplemented in pappso::PeptideFragmentIon.

Definition at line 61 of file peptideinterface.h.

62 {
63 return QString("unknown");
64 };

◆ getSequence()

virtual const QString pappso::PeptideInterface::getSequence ( ) const
pure virtual

amino acid sequence without modification

Implemented in pappso::Peptide, pappso::PeptideFragment, pappso::PeptideFragmentIon, and pappso::PeptideNaturalIsotope.

Referenced by getSequenceLi().

◆ getSequenceLi()

const QString pappso::PeptideInterface::getSequenceLi ( ) const
virtual

amino acid sequence without modification where L are replaced by I

Definition at line 31 of file peptideinterface.cpp.

32{
33 return QString(this->getSequence()).replace("L", "I");
34}
virtual const QString getSequence() const =0
amino acid sequence without modification

References getSequence().

Referenced by isPalindrome().

◆ isPalindrome()

virtual bool pappso::PeptideInterface::isPalindrome ( ) const
pure virtual

tells if the peptide sequence is a palindrome

Implemented in pappso::Peptide, pappso::PeptideFragment, pappso::PeptideFragmentIon, and pappso::PeptideNaturalIsotope.

References getSequenceLi().

◆ matchPeak()

virtual bool pappso::PeptideInterface::matchPeak ( PrecisionPtr precision,
pappso_double peak_mz,
unsigned int charge ) const
inlinefinalvirtual

tells if the peptide m/z matches a given experimental mass

Definition at line 73 of file peptideinterface.h.

74 {
75 return (MzRange((getMass() + (MHPLUS * charge)) / charge, precision).contains(peak_mz));
76 };
virtual pappso_double getMass() const =0
const pappso_double MHPLUS(1.007276466879)

References pappso::Ion::getMass(), and pappso::MHPLUS().

◆ size()

virtual unsigned int pappso::PeptideInterface::size ( ) const
pure virtual

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