libpappsomspp
Library for mass spectrometry
grpsubgroup.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3  *
4  * This file is part of the PAPPSOms++ library.
5  *
6  * PAPPSOms++ is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * PAPPSOms++ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Contributors:
20  * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21  *implementation
22  ******************************************************************************/
23 
24 
25 #pragma once
26 
27 
28 #include <memory>
29 #include <vector>
30 #include "grpprotein.h"
31 #include "grppeptideset.h"
32 
33 
34 namespace pappso
35 {
36 
37 class GrpSubGroup;
38 typedef std::shared_ptr<const GrpSubGroup> GrpSubGroupSpConst;
39 typedef std::shared_ptr<GrpSubGroup> GrpSubGroupSp;
40 
41 
43 {
44  private:
45  std::vector<GrpProtein *> m_grpProteinPtrList;
47  unsigned int m_subGroupNumber = 0;
48  unsigned int m_groupNumber = 0;
49 
50  public:
51  GrpSubGroup(GrpProtein *p_protein);
52  GrpSubGroup(const GrpSubGroup &other);
53 
54 
55  /** \brief sort subgroups between each other
56  * a subgroup containing less peptides is weaker (less) than the other
57  */
58  bool operator<(const GrpSubGroup &other) const;
59  ~GrpSubGroup();
61  const GrpPeptideSet &getPeptideSet() const;
62  bool merge(GrpSubGroup *p_subgroup);
63  bool includes(const GrpSubGroup *p_subgroup) const;
64  void numbering();
65  void setSubGroupNumber(unsigned int i);
66  void setGroupNumber(unsigned int i);
67  const QString &getFirstAccession() const;
68 
69  std::size_t peptideListSize() const;
70  unsigned int maxCount() const;
71 
72 
73  const QString getGroupingId() const;
74  unsigned int getGroupNumber() const;
75  unsigned int getSubGroupNumber() const;
76 
77  const std::vector<GrpProtein *> &getGrpProteinList() const;
78 };
79 
80 
81 } // namespace pappso
bool operator<(const GrpSubGroup &other) const
sort subgroups between each other a subgroup containing less peptides is weaker (less) than the other
Definition: grpsubgroup.cpp:87
std::vector< GrpProtein * > m_grpProteinPtrList
Definition: grpsubgroup.h:45
unsigned int getSubGroupNumber() const
Definition: grpsubgroup.cpp:53
unsigned int getGroupNumber() const
Definition: grpsubgroup.cpp:48
void setSubGroupNumber(unsigned int i)
const GrpPeptideSet & getPeptideSet() const
GrpSubGroup(GrpProtein *p_protein)
Definition: grpsubgroup.cpp:36
const QString getGroupingId() const
Definition: grpsubgroup.cpp:63
void setGroupNumber(unsigned int i)
bool includes(const GrpSubGroup *p_subgroup) const
std::size_t peptideListSize() const
unsigned int maxCount() const
Definition: grpsubgroup.cpp:74
unsigned int m_groupNumber
Definition: grpsubgroup.h:48
const QString & getFirstAccession() const
bool merge(GrpSubGroup *p_subgroup)
unsigned int m_subGroupNumber
Definition: grpsubgroup.h:47
const std::vector< GrpProtein * > & getGrpProteinList() const
Definition: grpsubgroup.cpp:58
GrpPeptideSet m_peptidePtrList
Definition: grpsubgroup.h:46
GrpSubGroupSp makeGrpSubGroupSp()
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< const GrpSubGroup > GrpSubGroupSpConst
Definition: grpsubgroup.h:37
std::shared_ptr< GrpSubGroup > GrpSubGroupSp
Definition: grpsubgroup.h:39