libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
peptideinterface.h
Go to the documentation of this file.
1
2/*******************************************************************************
3 * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4 *
5 * This file is part of the PAPPSOms++ library.
6 *
7 * PAPPSOms++ is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * PAPPSOms++ is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * Contributors:
21 * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
22 *implementation
23 ******************************************************************************/
24
25#pragma once
26
27#include <memory>
28#include "ion.h"
29#include <QString>
34
35
36namespace pappso
37{
38
40typedef std::shared_ptr<const PeptideInterface> PeptideInterfaceSp;
41
42
44{
45 public:
46 /** @brief amino acid sequence without modification
47 * */
48 virtual const QString getSequence() const = 0;
49
50
51 /** @brief tells if the peptide sequence is a palindrome
52 */
53 virtual bool isPalindrome() const = 0;
54
55 /** @brief amino acid sequence without modification where L are replaced by I
56 * */
57 virtual const QString getSequenceLi() const;
58
59 virtual unsigned int size() const = 0;
60 virtual const QString
61 getName() const
62 {
63 return QString("unknown");
64 };
65
66 virtual const ChemicalFormula getChemicalFormulaCharge(unsigned int charge) const;
67 virtual const QString getFormula(unsigned int charge) const final;
68
69
70 /** @brief tells if the peptide m/z matches a given experimental mass
71 */
72 virtual bool
73 matchPeak(PrecisionPtr precision, pappso_double peak_mz, unsigned int charge) const final
74 {
75 return (MzRange((getMass() + (MHPLUS * charge)) / charge, precision).contains(peak_mz));
76 };
77
78 // virtual int getNumberOfIsotope(Enums::Isotope isotope) const override = 0;
79};
80} // namespace pappso
virtual pappso_double getMass() const =0
virtual const QString getName() const
virtual const QString getSequence() const =0
amino acid sequence without modification
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
virtual const QString getSequenceLi() const
amino acid sequence without modification where L are replaced by I
virtual bool isPalindrome() const =0
tells if the peptide sequence is a palindrome
virtual unsigned int size() const =0
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const PeptideInterface > PeptideInterfaceSp
const pappso_double MHPLUS(1.007276466879)
double pappso_double
A type definition for doubles.
Definition types.h:61
const PrecisionBase * PrecisionPtr
Definition precision.h:122