libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
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< Enums::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
 
pappso_double getMass () const override
 
virtual int getNumberOfAtom (Enums::AtomIsotopeSurvey atom) const override
 get the number of atom C, O, N, H in the molecule
 
virtual int getNumberOfIsotope (Enums::Isotope isotope) const override
 get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
 
pappso_double getIntensityRatio (unsigned int charge) const
 
const std::map< Enums::Isotope, int > & getIsotopeMap () const
 
virtual unsigned int getIsotopeNumber () const
 
virtual bool isPalindrome () const override
 tells if the peptide sequence is a palindrome
 
- Public Member Functions inherited from pappso::PeptideInterface
virtual const QString getSequenceLi () const
 amino acid sequence without modification where L are replaced by I
 
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 getMz (unsigned int charge) const final
 
- Public Member Functions inherited from pappso::AtomNumberInterface
virtual const ChemicalFormula getChemicalFormula () const
 

Private Attributes

const PeptideInterfaceSp m_peptide
 
const std::map< Enums::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< Enums::Isotope, int > & map_isotope )

Definition at line 195 of file peptidenaturalisotope.cpp.

197 : m_peptide(peptide), m_mapIsotope(map_isotope)
198{
199 //_abundance = ((_number_of_carbon - number_of_C13) * ABUNDANCEC12) +
200 //(number_of_C13 * ABUNDANCEC13); p = pow(0.01, i)*pow(0.99, (c-i))*comb(c,i)
201 // qDebug()<< "pow" << pow(ABUNDANCEC13, number_of_C13)*pow(1-ABUNDANCEC13,
202 // (_number_of_carbon-number_of_C13));
203 // qDebug() <<"conb" << Combinations(_number_of_carbon,number_of_C13);
204
205 // CHNO
206 //_probC13 = pow(ABUNDANCEC13, number_of_C13)*pow((double)1-ABUNDANCEC13,
207 //(_number_of_carbon-number_of_C13))* (double)
208 // Combinations(_number_of_carbon,number_of_C13);
209 // qDebug() <<"_probC13" <<_probC13;
210
211 // number of fixed Oxygen atoms (already labelled, not natural) :
212 int number_of_fixed_oxygen = m_peptide.get()->getNumberOfIsotope(Enums::Isotope::O18) +
213 m_peptide.get()->getNumberOfIsotope(Enums::Isotope::O17);
214 int number_of_fixed_sulfur = m_peptide.get()->getNumberOfIsotope(Enums::Isotope::S33) +
215 m_peptide.get()->getNumberOfIsotope(Enums::Isotope::S34) +
216 m_peptide.get()->getNumberOfIsotope(Enums::Isotope::S36);
217
219 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::C) -
220 m_peptide.get()->getNumberOfIsotope(Enums::Isotope::C13),
223 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::N) -
224 m_peptide.get()->getNumberOfIsotope(Enums::Isotope::N15),
227 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::O) -
228 number_of_fixed_oxygen,
231 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::O) -
232 number_of_fixed_oxygen,
235 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::S) -
236 number_of_fixed_sulfur,
239 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::S) -
240 number_of_fixed_sulfur,
243 m_peptide.get()->getNumberOfAtom(Enums::AtomIsotopeSurvey::S) -
244 number_of_fixed_sulfur,
246
247
248 // qDebug() << "Aa::getMass() begin";
249 m_mass = m_peptide.get()->getMass();
258
259
260 // qDebug() << "Aa::getMass() end " << mass;
261}
const PeptideInterfaceSp m_peptide
const std::map< Enums::Isotope, int > m_mapIsotope
pappso_double isotopem_ratio_cache(Enums::Isotope isotope, unsigned int total, unsigned int heavy)
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)
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::Enums::C, pappso::Enums::C13, pappso::DIFFC12C13(), pappso::DIFFH1H2(), pappso::DIFFN14N15(), pappso::DIFFO16O17(), pappso::DIFFO16O18(), pappso::DIFFS32S33(), pappso::DIFFS32S34(), pappso::DIFFS32S36(), getNumberOfIsotope(), pappso::Enums::H2, pappso::isotopem_ratio_cache(), m_mapIsotope, m_mass, m_peptide, m_ratio, 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.

Referenced by PeptideNaturalIsotope().

◆ PeptideNaturalIsotope() [2/2]

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

Definition at line 263 of file peptidenaturalisotope.cpp.

264 : m_peptide(other.m_peptide), m_mapIsotope(other.m_mapIsotope)
265{
266 m_ratio = other.m_ratio;
267}

References PeptideNaturalIsotope(), m_mapIsotope, m_peptide, and m_ratio.

◆ ~PeptideNaturalIsotope()

pappso::PeptideNaturalIsotope::~PeptideNaturalIsotope ( )
virtual

Definition at line 269 of file peptidenaturalisotope.cpp.

270{
271}

Member Function Documentation

◆ getIntensityRatio()

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

◆ getIsotopeMap()

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

Definition at line 307 of file peptidenaturalisotope.cpp.

308{
309 return m_mapIsotope;
310}

References m_mapIsotope.

◆ getIsotopeNumber()

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

◆ getMass()

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

Implements pappso::Ion.

Definition at line 275 of file peptidenaturalisotope.cpp.

276{
277
278 return m_mass;
279}

References m_mass.

◆ getNumberOfAtom()

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

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

Implements pappso::AtomNumberInterface.

Definition at line 295 of file peptidenaturalisotope.cpp.

296{
297 return m_peptide.get()->getNumberOfAtom(atom);
298}

References m_peptide.

◆ getNumberOfIsotope()

int pappso::PeptideNaturalIsotope::getNumberOfIsotope ( Enums::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 301 of file peptidenaturalisotope.cpp.

302{
303 return m_mapIsotope.at(isotope) + m_peptide.get()->getNumberOfIsotope(isotope);
304}

References m_mapIsotope, and m_peptide.

Referenced by PeptideNaturalIsotope().

◆ getSequence()

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

amino acid sequence without modification

Implements pappso::PeptideInterface.

Definition at line 327 of file peptidenaturalisotope.cpp.

328{
329 return m_peptide.get()->getSequence();
330}

References m_peptide.

◆ isPalindrome()

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

tells if the peptide sequence is a palindrome

Implements pappso::PeptideInterface.

Definition at line 314 of file peptidenaturalisotope.cpp.

315{
316 return m_peptide.get()->isPalindrome();
317}

References m_peptide.

◆ size()

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

Implements pappso::PeptideInterface.

Definition at line 321 of file peptidenaturalisotope.cpp.

322{
323 return m_peptide.get()->size();
324}

References m_peptide.

Member Data Documentation

◆ m_mapIsotope

const std::map<Enums::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

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