libpappsomspp
Library for mass spectrometry
pappso::PeptideNaturalIsotope Class Reference

#include <peptidenaturalisotope.h>

Inheritance diagram for pappso::PeptideNaturalIsotope:
pappso::PeptideInterface pappso::Ion pappso::AtomNumberInterface

Public Member Functions

 PeptideNaturalIsotope (const PeptideInterfaceSp &peptide, const std::map< Isotope, int > &map_isotope)
 
 PeptideNaturalIsotope (const PeptideNaturalIsotope &other)
 
virtual ~PeptideNaturalIsotope ()
 
virtual unsigned int size () const override
 
virtual const QString getSequence () const override
 amino acid sequence without modification More...
 
pappso_double getMass () const override
 
virtual int getNumberOfAtom (AtomIsotopeSurvey atom) const override
 get the number of atom C, O, N, H in the molecule More...
 
virtual int getNumberOfIsotope (Isotope isotope) const override
 get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule More...
 
pappso_double getIntensityRatio (unsigned int charge) const
 
const std::map< Isotope, int > & getIsotopeMap () const
 
virtual unsigned int getIsotopeNumber () const
 
virtual bool isPalindrome () const override
 tells if the peptide sequence is a palindrome More...
 
- Public Member Functions inherited from pappso::PeptideInterface
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
 
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...
 

Private Attributes

const PeptideInterfaceSp m_peptide
 
const std::map< Isotope, int > m_mapIsotope
 
pappso_double m_ratio
 
pappso_double m_mass
 

Detailed Description

Definition at line 45 of file peptidenaturalisotope.h.

Constructor & Destructor Documentation

◆ PeptideNaturalIsotope() [1/2]

pappso::PeptideNaturalIsotope::PeptideNaturalIsotope ( const PeptideInterfaceSp peptide,
const std::map< Isotope, int > &  map_isotope 
)

Definition at line 201 of file peptidenaturalisotope.cpp.

203 : m_peptide(peptide), m_mapIsotope(map_isotope)
204{
205 //_abundance = ((_number_of_carbon - number_of_C13) * ABUNDANCEC12) +
206 //(number_of_C13 * ABUNDANCEC13); p = pow(0.01, i)*pow(0.99, (c-i))*comb(c,i)
207 // qDebug()<< "pow" << pow(ABUNDANCEC13, number_of_C13)*pow(1-ABUNDANCEC13,
208 // (_number_of_carbon-number_of_C13));
209 // qDebug() <<"conb" << Combinations(_number_of_carbon,number_of_C13);
210
211 // CHNO
212 //_probC13 = pow(ABUNDANCEC13, number_of_C13)*pow((double)1-ABUNDANCEC13,
213 //(_number_of_carbon-number_of_C13))* (double)
214 // Combinations(_number_of_carbon,number_of_C13);
215 // qDebug() <<"_probC13" <<_probC13;
216
217 // number of fixed Oxygen atoms (already labelled, not natural) :
218 int number_of_fixed_oxygen =
219 m_peptide.get()->getNumberOfIsotope(Isotope::O18) +
220 m_peptide.get()->getNumberOfIsotope(Isotope::O17);
221 int number_of_fixed_sulfur =
222 m_peptide.get()->getNumberOfIsotope(Isotope::S33) +
223 m_peptide.get()->getNumberOfIsotope(Isotope::S34) +
224 m_peptide.get()->getNumberOfIsotope(Isotope::S36);
225
228 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::C) -
229 m_peptide.get()->getNumberOfIsotope(Isotope::C13),
233 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::N) -
234 m_peptide.get()->getNumberOfIsotope(Isotope::N15),
238 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::O) -
239 number_of_fixed_oxygen,
243 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::O) -
244 number_of_fixed_oxygen,
248 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::S) -
249 number_of_fixed_sulfur,
253 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::S) -
254 number_of_fixed_sulfur,
258 m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::S) -
259 number_of_fixed_sulfur,
261
262
263 // qDebug() << "Aa::getMass() begin";
264 m_mass = m_peptide.get()->getMass();
273
274
275 // qDebug() << "Aa::getMass() end " << mass;
276}
const PeptideInterfaceSp m_peptide
const std::map< Isotope, int > m_mapIsotope
const pappso_double DIFFS32S33(32.9714589101 - MASSSULFUR)
const pappso_double DIFFS32S34(33.9678670300 - MASSSULFUR)
const pappso_double DIFFO16O17(16.99913150 - MASSOXYGEN)
const pappso_double DIFFS32S36(35.9670812000 - MASSSULFUR)
pappso_double isotopem_ratio_cache(Isotope isotope, unsigned int total, unsigned int heavy)
const pappso_double DIFFO16O18(17.9991610 - MASSOXYGEN)
const pappso_double DIFFN14N15(15.0001088982 - MASSNITROGEN)
const pappso_double DIFFC12C13(1.0033548378)
const pappso_double DIFFH1H2(2.0141017778 - MPROTIUM)

References pappso::C, pappso::C13, pappso::DIFFC12C13(), pappso::DIFFH1H2(), pappso::DIFFN14N15(), pappso::DIFFO16O17(), pappso::DIFFO16O18(), pappso::DIFFS32S33(), pappso::DIFFS32S34(), pappso::DIFFS32S36(), pappso::H2, pappso::isotopem_ratio_cache(), m_mapIsotope, m_mass, m_peptide, m_ratio, pappso::N, pappso::N15, pappso::O, pappso::O17, pappso::O18, pappso::S, pappso::S33, pappso::S34, and pappso::S36.

◆ PeptideNaturalIsotope() [2/2]

pappso::PeptideNaturalIsotope::PeptideNaturalIsotope ( const PeptideNaturalIsotope other)

Definition at line 278 of file peptidenaturalisotope.cpp.

279 : m_peptide(other.m_peptide), m_mapIsotope(other.m_mapIsotope)
280{
281 m_ratio = other.m_ratio;
282}

References m_ratio.

◆ ~PeptideNaturalIsotope()

pappso::PeptideNaturalIsotope::~PeptideNaturalIsotope ( )
virtual

Definition at line 284 of file peptidenaturalisotope.cpp.

285{
286}

Member Function Documentation

◆ getIntensityRatio()

pappso_double pappso::PeptideNaturalIsotope::getIntensityRatio ( unsigned int  charge) const

Definition at line 298 of file peptidenaturalisotope.cpp.

299{
300
301 return m_ratio *
304 (m_peptide.get()->getNumberOfAtom(AtomIsotopeSurvey::H) + charge) -
305 m_peptide.get()->getNumberOfIsotope(Isotope::H2),
307}

References pappso::H, pappso::H2, pappso::isotopem_ratio_cache(), m_mapIsotope, m_peptide, and m_ratio.

◆ getIsotopeMap()

const std::map< Isotope, int > & pappso::PeptideNaturalIsotope::getIsotopeMap ( ) const

Definition at line 324 of file peptidenaturalisotope.cpp.

325{
326 return m_mapIsotope;
327}

References m_mapIsotope.

◆ getIsotopeNumber()

unsigned int pappso::PeptideNaturalIsotope::getIsotopeNumber ( ) const
virtual

Definition at line 350 of file peptidenaturalisotope.cpp.

351{
352 // only count variable (natural) isotope
356 (m_mapIsotope.at(Isotope::S34) * 2) +
357 (m_mapIsotope.at(Isotope::S36) * 4);
358}

References pappso::C13, pappso::H2, m_mapIsotope, pappso::N15, pappso::O17, pappso::O18, pappso::S33, pappso::S34, and pappso::S36.

◆ getMass()

pappso_double pappso::PeptideNaturalIsotope::getMass ( ) const
overridevirtual

Implements pappso::Ion.

Definition at line 290 of file peptidenaturalisotope.cpp.

291{
292
293 return m_mass;
294}

References m_mass.

◆ getNumberOfAtom()

int pappso::PeptideNaturalIsotope::getNumberOfAtom ( AtomIsotopeSurvey  atom) const
overridevirtual

get the number of atom C, O, N, H in the molecule

Implements pappso::AtomNumberInterface.

Definition at line 311 of file peptidenaturalisotope.cpp.

312{
313 return m_peptide.get()->getNumberOfAtom(atom);
314}

References m_peptide.

◆ getNumberOfIsotope()

int pappso::PeptideNaturalIsotope::getNumberOfIsotope ( Isotope  isotope) const
overridevirtual

get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule

Implements pappso::AtomNumberInterface.

Definition at line 317 of file peptidenaturalisotope.cpp.

318{
319 return m_mapIsotope.at(isotope) +
320 m_peptide.get()->getNumberOfIsotope(isotope);
321}

References m_mapIsotope, and m_peptide.

◆ getSequence()

const QString pappso::PeptideNaturalIsotope::getSequence ( ) const
overridevirtual

amino acid sequence without modification

Implements pappso::PeptideInterface.

Definition at line 344 of file peptidenaturalisotope.cpp.

345{
346 return m_peptide.get()->getSequence();
347}

References m_peptide.

◆ isPalindrome()

bool pappso::PeptideNaturalIsotope::isPalindrome ( ) const
overridevirtual

tells if the peptide sequence is a palindrome

Implements pappso::PeptideInterface.

Definition at line 331 of file peptidenaturalisotope.cpp.

332{
333 return m_peptide.get()->isPalindrome();
334}

References m_peptide.

◆ size()

unsigned int pappso::PeptideNaturalIsotope::size ( ) const
overridevirtual

Implements pappso::PeptideInterface.

Definition at line 338 of file peptidenaturalisotope.cpp.

339{
340 return m_peptide.get()->size();
341}

References m_peptide.

Member Data Documentation

◆ m_mapIsotope

const std::map<Isotope, int> pappso::PeptideNaturalIsotope::m_mapIsotope
private

◆ m_mass

pappso_double pappso::PeptideNaturalIsotope::m_mass
private

Definition at line 73 of file peptidenaturalisotope.h.

Referenced by PeptideNaturalIsotope(), and getMass().

◆ m_peptide

const PeptideInterfaceSp pappso::PeptideNaturalIsotope::m_peptide
private

◆ m_ratio

pappso_double pappso::PeptideNaturalIsotope::m_ratio
private

Definition at line 72 of file peptidenaturalisotope.h.

Referenced by PeptideNaturalIsotope(), and getIntensityRatio().


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