pappsomspp
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

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

Friends

class GrpExperiment
 

Detailed Description

Definition at line 58 of file grpprotein.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 94 of file grpprotein.h.

Constructor & Destructor Documentation

◆ GrpProtein() [1/2]

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

Definition at line 32 of file grpprotein.cpp.

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

◆ GrpProtein() [2/2]

GrpProtein::GrpProtein ( const GrpProtein other)

Definition at line 38 of file grpprotein.cpp.

◆ ~GrpProtein()

GrpProtein::~GrpProtein ( )

Definition at line 45 of file grpprotein.cpp.

47 {

Member Function Documentation

◆ begin()

const_iterator pappso::GrpProtein::begin ( ) const
inline

Definition at line 96 of file grpprotein.h.

◆ countPlus()

void GrpProtein::countPlus ( )
protected

Definition at line 55 of file grpprotein.cpp.

57 {
58  m_count++;

References m_count.

◆ end()

const_iterator pappso::GrpProtein::end ( ) const
inline

Definition at line 101 of file grpprotein.h.

◆ getAccession()

const QString & GrpProtein::getAccession ( ) const

Definition at line 101 of file grpprotein.cpp.

103 {
104  return m_accession;

References m_accession.

Referenced by pappso::GrpSubGroup::setSubGroupNumber().

◆ getCount()

unsigned int GrpProtein::getCount ( ) const

Definition at line 50 of file grpprotein.cpp.

52 {
53  return m_count;

References m_count.

◆ getDescription()

const QString & GrpProtein::getDescription ( ) const

Definition at line 106 of file grpprotein.cpp.

108 {
109  return m_description;

References m_description.

◆ getGroupingId()

const QString GrpProtein::getGroupingId ( ) const

Definition at line 82 of file grpprotein.cpp.

84 {
85  if(m_groupNumber == 0)
86  {
87  return "";
88  }
89  return QString("%1.%2.%3")

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

◆ getGroupNumber()

unsigned int GrpProtein::getGroupNumber ( ) const

Definition at line 66 of file grpprotein.cpp.

68 {
69  return m_groupNumber;

References m_groupNumber.

◆ getRank()

unsigned int GrpProtein::getRank ( ) const

Definition at line 77 of file grpprotein.cpp.

79 {
80  return m_rank;

References m_rank.

◆ getSubGroupNumber()

unsigned int GrpProtein::getSubGroupNumber ( ) const

Definition at line 72 of file grpprotein.cpp.

74 {
75  return m_subGroupNumber;

References m_subGroupNumber.

◆ operator==()

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

Definition at line 94 of file grpprotein.cpp.

96 {
97  return (m_accession == other.m_accession);

References m_accession.

◆ push_back()

void GrpProtein::push_back ( GrpPeptide p_grpPeptide)

Definition at line 111 of file grpprotein.cpp.

113 {
114  // p_grpPeptide->push_back(this);
115  m_grpPeptidePtrList.push_back(p_grpPeptide);

References m_grpPeptidePtrList.

◆ setGroupNumber()

void GrpProtein::setGroupNumber ( unsigned int  i)

Definition at line 136 of file grpprotein.cpp.

138 {
139  m_groupNumber = i;

References m_groupNumber.

◆ setRank()

void GrpProtein::setRank ( unsigned int  i)

Definition at line 131 of file grpprotein.cpp.

133 {
134  m_rank = i;

References m_rank.

◆ setSubGroupNumber()

void GrpProtein::setSubGroupNumber ( unsigned int  i)

Definition at line 60 of file grpprotein.cpp.

62 {
63  m_subGroupNumber = i;

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 118 of file grpprotein.cpp.

120 {
121  qDebug() << "GrpProtein::strip begin " << this->m_accession;
122  // m_grpPeptidePtrList.sort();
123  std::sort(m_grpPeptidePtrList.begin(), m_grpPeptidePtrList.end());
124  // m_grpPeptidePtrList.unique();
125  m_grpPeptidePtrList.erase(
126  std::unique(m_grpPeptidePtrList.begin(), m_grpPeptidePtrList.end()),
127  m_grpPeptidePtrList.end());
128  qDebug() << "GrpProtein::strip end";

References m_accession, and m_grpPeptidePtrList.

Friends And Related Function Documentation

◆ GrpExperiment

friend class GrpExperiment
friend

Definition at line 60 of file grpprotein.h.

Member Data Documentation

◆ m_accession

const QString pappso::GrpProtein::m_accession
private

Definition at line 68 of file grpprotein.h.

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

◆ m_count

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

Definition at line 66 of file grpprotein.h.

Referenced by countPlus(), and getCount().

◆ m_description

const QString pappso::GrpProtein::m_description
private

Definition at line 69 of file grpprotein.h.

Referenced by getDescription().

◆ m_groupNumber

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

Definition at line 63 of file grpprotein.h.

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

◆ m_grpPeptidePtrList

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

Definition at line 82 of file grpprotein.h.

Referenced by push_back(), and strip().

◆ m_rank

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

Definition at line 65 of file grpprotein.h.

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

◆ m_subGroupNumber

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

Definition at line 64 of file grpprotein.h.

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


The documentation for this class was generated from the following files:
pappso::GrpProtein::m_groupNumber
unsigned int m_groupNumber
Definition: grpprotein.h:63
pappso::GrpProtein::m_grpPeptidePtrList
std::vector< GrpPeptide * > m_grpPeptidePtrList
Definition: grpprotein.h:82
pappso::GrpProtein::m_rank
unsigned int m_rank
Definition: grpprotein.h:65
pappso::GrpProtein::m_subGroupNumber
unsigned int m_subGroupNumber
Definition: grpprotein.h:64
pappso::GrpProtein::m_accession
const QString m_accession
Definition: grpprotein.h:68
pappso::GrpProtein::m_description
const QString m_description
Definition: grpprotein.h:69
pappso::GrpProtein::m_count
unsigned int m_count
Definition: grpprotein.h:66
pappso::Utils::getLexicalOrderedString
static const QString getLexicalOrderedString(unsigned int num)
Definition: utils.cpp:71