libpappsomspp
Library for mass spectrometry
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
35
namespace
pappso
36
{
37
38
class
PeptideInterface;
39
typedef
std::shared_ptr<const PeptideInterface>
PeptideInterfaceSp
;
40
41
42
class
PMSPP_LIB_DECL
PeptideInterface :
public
Ion,
public
AtomNumberInterface
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
68
matchPeak(
PrecisionPtr
precision,
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
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition:
types.h:69
pappso::MHPLUS
const pappso_double MHPLUS(1.007276466879)
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition:
aa.cpp:39
pappso::PeptideInterfaceSp
std::shared_ptr< const PeptideInterface > PeptideInterfaceSp
Definition:
peptideinterface.h:59
pappso::MzRange
Definition:
mzrange.h:67
pappso::PrecisionBase
Definition:
precision.h:65
ion.h
ion interface
pappsomspp
peptide
peptideinterface.h
Generated on Mon Aug 24 2020 17:42:19 for libpappsomspp by
1.8.18