libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
grppeptide.cpp
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
#include "
grppeptide.h
"
26
#include "
pappsomspp/core/utils.h
"
27
28
using namespace
pappso
;
29
30
GrpPeptide::GrpPeptide
(QString sequence,
pappso_double
mass)
31
:
m_sequence
(sequence.replace(
"L"
,
"I"
)),
m_mass
(mass)
32
{
33
}
34
35
GrpPeptide::~GrpPeptide
()
36
{
37
}
38
39
bool
40
GrpPeptide::operator<
(
const
GrpPeptide
&other)
const
41
{
42
if
(
m_sequence
== other.
m_sequence
)
43
{
44
return
(
m_mass
< other.
m_mass
);
45
}
46
else
47
{
48
return
(
m_sequence
< other.
m_sequence
);
49
}
50
}
51
52
void
53
GrpPeptide::setRank
(
unsigned
int
i)
54
{
55
m_rank
= i;
56
}
57
void
58
GrpPeptide::setGroupNumber
(
unsigned
int
i)
59
{
60
m_groupNumber
= i;
61
}
62
63
unsigned
int
64
GrpPeptide::getGroupNumber
()
const
65
{
66
return
m_groupNumber
;
67
}
68
unsigned
int
69
GrpPeptide::getRank
()
const
70
{
71
return
m_rank
;
72
}
73
const
QString &
74
GrpPeptide::getSequence
()
const
75
{
76
return
m_sequence
;
77
}
78
const
QString
79
GrpPeptide::getGroupingId
()
const
80
{
81
return
QString(
"pep%1%2"
)
82
.arg(
Utils::getLexicalOrderedString
(
m_groupNumber
))
83
.arg(
Utils::getLexicalOrderedString
(
m_rank
));
84
}
pappso::GrpPeptide::GrpPeptide
GrpPeptide(QString sequence, pappso_double mass)
Definition
grppeptide.cpp:30
pappso::GrpPeptide::m_groupNumber
unsigned int m_groupNumber
Definition
grppeptide.h:47
pappso::GrpPeptide::~GrpPeptide
~GrpPeptide()
Definition
grppeptide.cpp:35
pappso::GrpPeptide::getSequence
const QString & getSequence() const
Definition
grppeptide.cpp:74
pappso::GrpPeptide::m_mass
const pappso_double m_mass
Definition
grppeptide.h:51
pappso::GrpPeptide::m_rank
unsigned int m_rank
Definition
grppeptide.h:48
pappso::GrpPeptide::getRank
unsigned int getRank() const
Definition
grppeptide.cpp:69
pappso::GrpPeptide::getGroupNumber
unsigned int getGroupNumber() const
Definition
grppeptide.cpp:64
pappso::GrpPeptide::getGroupingId
const QString getGroupingId() const
Definition
grppeptide.cpp:79
pappso::GrpPeptide::setRank
void setRank(unsigned int i)
Definition
grppeptide.cpp:53
pappso::GrpPeptide::m_sequence
const QString m_sequence
Definition
grppeptide.h:50
pappso::GrpPeptide::setGroupNumber
void setGroupNumber(unsigned int i)
Definition
grppeptide.cpp:58
pappso::GrpPeptide::operator<
bool operator<(const GrpPeptide &other) const
sort grp peptides between each other sorts by peptide LI sequence and mass
Definition
grppeptide.cpp:40
pappso::Utils::getLexicalOrderedString
static const QString getLexicalOrderedString(unsigned int num)
Definition
utils.cpp:72
grppeptide.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition
types.h:60
utils.h
pappsomspp
core
grouping
grppeptide.cpp
Generated on
for libpappsomspp by
1.17.0