libpappsomspp
Library for mass spectrometry
pappso::GrpPeptide Class Reference

#include <grppeptide.h>

Public Member Functions

 ~GrpPeptide ()
 
const QString & getSequence () const
 
bool operator< (const GrpPeptide &other) const
 sort grp peptides between each other sorts by peptide LI sequence and mass More...
 
void setRank (unsigned int i)
 
void setGroupNumber (unsigned int i)
 
const QString getGroupingId () const
 
unsigned int getGroupNumber () const
 
unsigned int getRank () const
 

Protected Member Functions

 GrpPeptide (QString sequence, pappso_double mass)
 

Private Attributes

unsigned int m_groupNumber = 0
 
unsigned int m_rank = 0
 
const QString m_sequence
 
const pappso_double m_mass
 

Friends

class GrpExperiment
 

Detailed Description

Definition at line 42 of file grppeptide.h.

Constructor & Destructor Documentation

◆ GrpPeptide()

GrpPeptide::GrpPeptide ( QString  sequence,
pappso_double  mass 
)
protected

Definition at line 30 of file grppeptide.cpp.

31  : m_sequence(sequence.replace("L", "I")), m_mass(mass)
32 {
33 }
const pappso_double m_mass
Definition: grppeptide.h:51
const QString m_sequence
Definition: grppeptide.h:50

◆ ~GrpPeptide()

GrpPeptide::~GrpPeptide ( )

Definition at line 35 of file grppeptide.cpp.

36 {
37 }

Member Function Documentation

◆ getGroupingId()

const QString GrpPeptide::getGroupingId ( ) const

Definition at line 79 of file grppeptide.cpp.

80 {
81  return QString("pep%1%2")
84 }
unsigned int m_groupNumber
Definition: grppeptide.h:47
unsigned int m_rank
Definition: grppeptide.h:48
static const QString getLexicalOrderedString(unsigned int num)
Definition: utils.cpp:52

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

◆ getGroupNumber()

unsigned int GrpPeptide::getGroupNumber ( ) const

Definition at line 64 of file grppeptide.cpp.

65 {
66  return m_groupNumber;
67 }

References m_groupNumber.

◆ getRank()

unsigned int GrpPeptide::getRank ( ) const

Definition at line 69 of file grppeptide.cpp.

70 {
71  return m_rank;
72 }

References m_rank.

◆ getSequence()

const QString & GrpPeptide::getSequence ( ) const

Definition at line 74 of file grppeptide.cpp.

75 {
76  return m_sequence;
77 }

References m_sequence.

◆ operator<()

bool GrpPeptide::operator< ( const GrpPeptide other) const

sort grp peptides between each other sorts by peptide LI sequence and mass

Definition at line 39 of file grppeptide.cpp.

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 }

References m_mass, and m_sequence.

◆ setGroupNumber()

void GrpPeptide::setGroupNumber ( unsigned int  i)

Definition at line 58 of file grppeptide.cpp.

59 {
60  m_groupNumber = i;
61 }

References m_groupNumber.

◆ setRank()

void GrpPeptide::setRank ( unsigned int  i)

Definition at line 53 of file grppeptide.cpp.

54 {
55  m_rank = i;
56 }

References m_rank.

Friends And Related Function Documentation

◆ GrpExperiment

friend class GrpExperiment
friend

Definition at line 44 of file grppeptide.h.

Member Data Documentation

◆ m_groupNumber

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

Definition at line 47 of file grppeptide.h.

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

◆ m_mass

const pappso_double pappso::GrpPeptide::m_mass
private

Definition at line 51 of file grppeptide.h.

Referenced by operator<().

◆ m_rank

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

Definition at line 48 of file grppeptide.h.

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

◆ m_sequence

const QString pappso::GrpPeptide::m_sequence
private

Definition at line 50 of file grppeptide.h.

Referenced by getSequence(), and operator<().


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