libpappsomspp
Library for mass spectrometry
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 "../utils.h"
27
28using namespace pappso;
29
31 : m_sequence(sequence.replace("L", "I")), m_mass(mass)
32{
33}
34
38
39bool
40GrpPeptide::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
52void
53GrpPeptide::setRank(unsigned int i)
54{
55 m_rank = i;
56}
57void
59{
60 m_groupNumber = i;
61}
62
63unsigned int
65{
66 return m_groupNumber;
67}
68unsigned int
70{
71 return m_rank;
72}
73const QString &
75{
76 return m_sequence;
77}
78const QString
GrpPeptide(QString sequence, pappso_double mass)
unsigned int m_groupNumber
Definition grppeptide.h:47
const QString & getSequence() const
const pappso_double m_mass
Definition grppeptide.h:51
unsigned int m_rank
Definition grppeptide.h:48
unsigned int getRank() const
unsigned int getGroupNumber() const
const QString getGroupingId() const
void setRank(unsigned int i)
const QString m_sequence
Definition grppeptide.h:50
void setGroupNumber(unsigned int i)
bool operator<(const GrpPeptide &other) const
sort grp peptides between each other sorts by peptide LI sequence and mass
static const QString getLexicalOrderedString(unsigned int num)
Definition utils.cpp:74
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
double pappso_double
A type definition for doubles.
Definition types.h:50