libpappsomspp
Library for mass spectrometry
pappso::GrpProtein Class Reference

#include <grpprotein.h>

Public Types

typedef std::vector< GrpPeptide * >::const_iterator const_iterator
 

Public Member Functions

 GrpProtein (const GrpProtein &other)
 
 ~GrpProtein ()
 
void push_back (GrpPeptide *p_grpPeptide)
 
bool operator== (const GrpProtein &other) const
 
const QString & getAccession () const
 
const QString & getDescription () const
 
const QString getGroupingId () const
 
const_iterator begin () const
 
const_iterator end () const
 
void setRank (unsigned int i)
 
void setGroupNumber (unsigned int i)
 
void setSubGroupNumber (unsigned int i)
 
unsigned int getGroupNumber () const
 
unsigned int getSubGroupNumber () const
 
unsigned int getRank () const
 
unsigned int getCount () const
 

Protected Member Functions

 GrpProtein (const QString &accession, const QString &description)
 
void countPlus ()
 
void strip ()
 ensure that each peptide in peptide list is unique and sorted by pointer adress More...
 

Protected Attributes

std::vector< GrpPeptide * > m_grpPeptidePtrList
 

Private Attributes

const QString m_accession
 
const QString m_description
 
unsigned int m_groupNumber = 0
 
unsigned int m_subGroupNumber = 0
 
unsigned int m_rank = 0
 
unsigned int m_count = 0
 

Friends

class GrpExperiment
 

Detailed Description

Definition at line 39 of file grpprotein.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 54 of file grpprotein.h.

Constructor & Destructor Documentation

◆ GrpProtein() [1/2]

GrpProtein::GrpProtein ( const GrpProtein other)

Definition at line 39 of file grpprotein.cpp.

41  m_accession(other.m_accession),
43 
44 {
45 
48  m_rank = other.m_rank;
49  m_count = other.m_count;
50 }
const QString m_accession
Definition: grpprotein.h:80
const QString m_description
Definition: grpprotein.h:81
unsigned int m_rank
Definition: grpprotein.h:84
std::vector< GrpPeptide * > m_grpPeptidePtrList
Definition: grpprotein.h:77
unsigned int m_groupNumber
Definition: grpprotein.h:82
unsigned int m_subGroupNumber
Definition: grpprotein.h:83
unsigned int m_count
Definition: grpprotein.h:85

References m_count, m_groupNumber, m_rank, and m_subGroupNumber.

◆ ~GrpProtein()

GrpProtein::~GrpProtein ( )

Definition at line 52 of file grpprotein.cpp.

53 {
54 }

◆ GrpProtein() [2/2]

GrpProtein::GrpProtein ( const QString &  accession,
const QString &  description 
)
protected

Definition at line 33 of file grpprotein.cpp.

34  : m_accession(accession.simplified()), m_description(description.simplified())
35 {
36 }

Member Function Documentation

◆ begin()

GrpProtein::const_iterator GrpProtein::begin ( ) const

Definition at line 57 of file grpprotein.cpp.

58 {
59  return m_grpPeptidePtrList.begin();
60 }

References m_grpPeptidePtrList.

Referenced by pappso::GrpPeptideSet::GrpPeptideSet().

◆ countPlus()

void GrpProtein::countPlus ( )
protected

Definition at line 73 of file grpprotein.cpp.

74 {
75  m_count++;
76 }

References m_count.

◆ end()

GrpProtein::const_iterator GrpProtein::end ( ) const

Definition at line 62 of file grpprotein.cpp.

63 {
64  return m_grpPeptidePtrList.end();
65 }

References m_grpPeptidePtrList.

Referenced by pappso::GrpPeptideSet::GrpPeptideSet().

◆ getAccession()

const QString & GrpProtein::getAccession ( ) const

Definition at line 119 of file grpprotein.cpp.

120 {
121  return m_accession;
122 }

References m_accession.

◆ getCount()

unsigned int GrpProtein::getCount ( ) const

Definition at line 68 of file grpprotein.cpp.

69 {
70  return m_count;
71 }

References m_count.

◆ getDescription()

const QString & GrpProtein::getDescription ( ) const

Definition at line 124 of file grpprotein.cpp.

125 {
126  return m_description;
127 }

References m_description.

◆ getGroupingId()

const QString GrpProtein::getGroupingId ( ) const

Definition at line 100 of file grpprotein.cpp.

101 {
102  if(m_groupNumber == 0)
103  {
104  return "";
105  }
106  return QString("%1.%2.%3")
110 }
static const QString getLexicalOrderedString(unsigned int num)
Definition: utils.cpp:52

References pappso::Utils::getLexicalOrderedString(), m_groupNumber, m_rank, and m_subGroupNumber.

◆ getGroupNumber()

unsigned int GrpProtein::getGroupNumber ( ) const

Definition at line 84 of file grpprotein.cpp.

85 {
86  return m_groupNumber;
87 }

References m_groupNumber.

◆ getRank()

unsigned int GrpProtein::getRank ( ) const

Definition at line 95 of file grpprotein.cpp.

96 {
97  return m_rank;
98 }

References m_rank.

◆ getSubGroupNumber()

unsigned int GrpProtein::getSubGroupNumber ( ) const

Definition at line 90 of file grpprotein.cpp.

91 {
92  return m_subGroupNumber;
93 }

References m_subGroupNumber.

◆ operator==()

bool GrpProtein::operator== ( const GrpProtein other) const

Definition at line 112 of file grpprotein.cpp.

113 {
114  return (m_accession == other.m_accession);
115 }

References m_accession.

◆ push_back()

void GrpProtein::push_back ( GrpPeptide p_grpPeptide)

Definition at line 129 of file grpprotein.cpp.

130 {
131  // p_grpPeptide->push_back(this);
132  m_grpPeptidePtrList.push_back(p_grpPeptide);
133 }

References m_grpPeptidePtrList.

◆ setGroupNumber()

void GrpProtein::setGroupNumber ( unsigned int  i)

Definition at line 154 of file grpprotein.cpp.

155 {
156  m_groupNumber = i;
157 }

References m_groupNumber.

◆ setRank()

void GrpProtein::setRank ( unsigned int  i)

Definition at line 149 of file grpprotein.cpp.

150 {
151  m_rank = i;
152 }

References m_rank.

◆ setSubGroupNumber()

void GrpProtein::setSubGroupNumber ( unsigned int  i)

Definition at line 78 of file grpprotein.cpp.

79 {
80  m_subGroupNumber = i;
81 }

References m_subGroupNumber.

◆ strip()

void GrpProtein::strip ( )
protected

ensure that each peptide in peptide list is unique and sorted by pointer adress

Definition at line 136 of file grpprotein.cpp.

137 {
138  qDebug() << "GrpProtein::strip begin " << this->m_accession;
139  // m_grpPeptidePtrList.sort();
140  std::sort(m_grpPeptidePtrList.begin(), m_grpPeptidePtrList.end());
141  // m_grpPeptidePtrList.unique();
142  m_grpPeptidePtrList.erase(
143  std::unique(m_grpPeptidePtrList.begin(), m_grpPeptidePtrList.end()),
144  m_grpPeptidePtrList.end());
145  qDebug() << "GrpProtein::strip end";
146 }

References m_accession, and m_grpPeptidePtrList.

Friends And Related Function Documentation

◆ GrpExperiment

friend class GrpExperiment
friend

Definition at line 41 of file grpprotein.h.

Member Data Documentation

◆ m_accession

const QString pappso::GrpProtein::m_accession
private

Definition at line 80 of file grpprotein.h.

Referenced by getAccession(), operator==(), and strip().

◆ m_count

unsigned int pappso::GrpProtein::m_count = 0
private

Definition at line 85 of file grpprotein.h.

Referenced by GrpProtein(), countPlus(), and getCount().

◆ m_description

const QString pappso::GrpProtein::m_description
private

Definition at line 81 of file grpprotein.h.

Referenced by getDescription().

◆ m_groupNumber

unsigned int pappso::GrpProtein::m_groupNumber = 0
private

Definition at line 82 of file grpprotein.h.

Referenced by GrpProtein(), getGroupingId(), getGroupNumber(), and setGroupNumber().

◆ m_grpPeptidePtrList

std::vector<GrpPeptide *> pappso::GrpProtein::m_grpPeptidePtrList
protected

Definition at line 77 of file grpprotein.h.

Referenced by begin(), end(), push_back(), and strip().

◆ m_rank

unsigned int pappso::GrpProtein::m_rank = 0
private

Definition at line 84 of file grpprotein.h.

Referenced by GrpProtein(), getGroupingId(), getRank(), and setRank().

◆ m_subGroupNumber

unsigned int pappso::GrpProtein::m_subGroupNumber = 0
private

Definition at line 83 of file grpprotein.h.

Referenced by GrpProtein(), getGroupingId(), getSubGroupNumber(), and setSubGroupNumber().


The documentation for this class was generated from the following files: