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>
30#include "../amino_acid/atomnumberinterface.h"
31#include "../mzrange.h"
32#include "../exportinmportconfig.h"
33
34
35namespace pappso
36{
37
38class PeptideInterface;
39typedef std::shared_ptr<const PeptideInterface> PeptideInterfaceSp;
40
41
43{
44 public:
45 /** @brief amino acid sequence without modification
46 * */
47 virtual const QString getSequence() const = 0;
48
49
50 /** @brief tells if the peptide sequence is a palindrome
51 */
52 virtual bool isPalindrome() const = 0;
53
54 /** @brief amino acid sequence without modification where L are replaced by I
55 * */
56 virtual const QString getSequenceLi() const;
57
58 virtual unsigned int size() const = 0;
59 virtual const QString
60 getName() const
61 {
62 return QString("unknown");
63 };
64
65 virtual const QString getFormula(unsigned int charge) const final;
66
67 virtual bool
69 pappso_double peak_mz,
70 unsigned int charge) const final
71 {
72 return (MzRange((getMass() + (MHPLUS * charge)) / charge, precision)
73 .contains(peak_mz));
74 }
75
76 // virtual int getNumberOfIsotope(Isotope isotope) const override = 0;
77};
78} // namespace pappso
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
virtual bool isPalindrome() const =0
tells if the peptide sequence is a palindrome
virtual unsigned int size() const =0
#define PMSPP_LIB_DECL
ion interface
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:50