libpappsomspp
Library for mass spectrometry
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 More...
 
virtual bool isPalindrome () const =0
 tells if the peptide sequence is a palindrome More...
 
virtual const QString getSequenceLi () const
 amino acid sequence without modification where L are replaced by I More...
 
virtual unsigned int size () const =0
 
virtual const QString getName () const
 
virtual const QString getFormula (unsigned int charge) const final
 
virtual bool matchPeak (PrecisionPtr precision, pappso_double peak_mz, unsigned int charge) const final
 
- 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 (AtomIsotopeSurvey atom) const =0
 get the number of atom C, O, N, H in the molecule More...
 
virtual int getNumberOfIsotope (Isotope isotope) const =0
 get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule More...
 

Detailed Description

Definition at line 42 of file peptideinterface.h.

Member Function Documentation

◆ getFormula()

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

Definition at line 36 of file peptideinterface.cpp.

37 {
38  QString carbon(
39  QString("C %1").arg(this->getNumberOfAtom(AtomIsotopeSurvey::C) -
41  if(this->getNumberOfIsotope(Isotope::C13) > 0)
42  {
43  carbon.append(
44  QString(" (13)C %1").arg(this->getNumberOfIsotope(Isotope::C13)));
45  }
46  QString hydrogen(
47  QString("H %1").arg(this->getNumberOfAtom(AtomIsotopeSurvey::H) + charge -
49  if(this->getNumberOfIsotope(Isotope::H2) > 0)
50  {
51  hydrogen.append(
52  QString(" (2)H %1").arg(this->getNumberOfIsotope(Isotope::H2)));
53  }
54  QString oxygen(
55  QString("O %1").arg(this->getNumberOfAtom(AtomIsotopeSurvey::O) -
58  if(this->getNumberOfIsotope(Isotope::O17) > 0)
59  {
60  oxygen.append(
61  QString(" (17)O %1").arg(this->getNumberOfIsotope(Isotope::O17)));
62  }
63  if(this->getNumberOfIsotope(Isotope::O18) > 0)
64  {
65  oxygen.append(
66  QString(" (18)O %1").arg(this->getNumberOfIsotope(Isotope::O18)));
67  }
68  QString nitrogen(
69  QString("N %1").arg(this->getNumberOfAtom(AtomIsotopeSurvey::N) -
71  if(this->getNumberOfIsotope(Isotope::N15) > 0)
72  {
73  nitrogen.append(
74  QString(" (15)N %1").arg(this->getNumberOfIsotope(Isotope::N15)));
75  }
76 
77  QString sulfur(
78  QString("S %1").arg(this->getNumberOfAtom(AtomIsotopeSurvey::S) -
82  if(this->getNumberOfIsotope(Isotope::S33) > 0)
83  {
84  sulfur.append(
85  QString(" (33)S %1").arg(this->getNumberOfIsotope(Isotope::S33)));
86  }
87  if(this->getNumberOfIsotope(Isotope::S34) > 0)
88  {
89  sulfur.append(
90  QString(" (34)S %1").arg(this->getNumberOfIsotope(Isotope::S34)));
91  }
92  if(this->getNumberOfIsotope(Isotope::S36) > 0)
93  {
94  sulfur.append(
95  QString(" (36)S %1").arg(this->getNumberOfIsotope(Isotope::S36)));
96  }
97  return QString("%1 %2 %3 %4 %5")
98  .arg(carbon)
99  .arg(hydrogen)
100  .arg(oxygen)
101  .arg(nitrogen)
102  .arg(sulfur);
103 }
virtual int getNumberOfIsotope(Isotope isotope) const =0
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
virtual int getNumberOfAtom(AtomIsotopeSurvey atom) const =0
get the number of atom C, O, N, H in the molecule

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

◆ getName()

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

Reimplemented in pappso::PeptideFragmentIon.

Definition at line 60 of file peptideinterface.h.

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

◆ getSequence()

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

amino acid sequence without modification

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

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().

◆ isPalindrome()

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

tells if the peptide sequence is a palindrome

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

◆ matchPeak()

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

Definition at line 68 of file peptideinterface.h.

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

References pappso::MHPLUS().

◆ size()

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

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