Loading...
Searching...
No Matches
pappso::GrpPeptideSet Class Reference

`#include <grppeptideset.h>`

## Public Member Functions

| GrpPeptideSet ()
| GrpPeptideSet (const GrpPeptideSet &other)
| GrpPeptideSet (const GrpProtein *p_protein)
| ~GrpPeptideSet ()
GrpPeptideSet & | operator= (const GrpPeptideSet &other)
bool | operator== (const GrpPeptideSet &other) const
unsigned int | size () const
bool | biggerAndContainsAll (const GrpPeptideSet &peptideSet) const
bool | contains (const GrpPeptide *p_grp_peptide) const
bool | containsAll (const GrpPeptideSet &peptideSet) const
bool | containsAny (const GrpPeptideSet &peptideSet) const
void | addAll (const GrpPeptideSet &peptideSet)
const QString | printInfos () const
void | numbering ()
void | setGroupNumber (unsigned int i)
std::vector< const GrpPeptide * > | getGrpPeptideList () const

## Private Member Functions

bool | privContainsAll (const GrpPeptideSet &peptideSetIn) const

## Private Attributes

std::list< GrpPeptide * > | m_peptidePtrList

## Friends

class | GrpMapPeptideToSubGroupSet
class | GrpMapPeptideToGroup

## Detailed Description

Definition at line 35 of file grppeptideset.h.

## Constructor & Destructor Documentation

## GrpPeptideSet() [1/3]

GrpPeptideSet::GrpPeptideSet | ( |  | ) |

Definition at line 29 of file grppeptideset.cpp.

{
}

## GrpPeptideSet() [2/3]

GrpPeptideSet::GrpPeptideSet | ( | const GrpPeptideSet & | other | ) |

Definition at line 41 of file grppeptideset.cpp.

: m_peptidePtrList(other.m_peptidePtrList)
{
}
pappso::GrpPeptideSet::m_peptidePtrList
std::list< GrpPeptide * > m_peptidePtrList
Definition grppeptideset.h:41

## GrpPeptideSet() [3/3]

GrpPeptideSet::GrpPeptideSet | ( | const GrpProtein * | p_protein | ) |

Definition at line 32 of file grppeptideset.cpp.

{
auto it = p_protein->begin();
while(it != p_protein->end())
{
m_peptidePtrList.push_back(*it);
it++;
}
}
pappso::GrpProtein::end
const_iterator end() const
Definition grpprotein.cpp:62
pappso::GrpProtein::begin
const_iterator begin() const
Definition grpprotein.cpp:57

References pappso::GrpProtein::begin(), pappso::GrpProtein::end(), and m_peptidePtrList.

## ~GrpPeptideSet()

GrpPeptideSet::~GrpPeptideSet | ( |  | ) |

Definition at line 46 of file grppeptideset.cpp.

{
}

## Member Function Documentation

## addAll()

void GrpPeptideSet::addAll | ( | const GrpPeptideSet & | peptideSet | ) |

Definition at line 165 of file grppeptideset.cpp.

{
qDebug() << "GrpPeptideSet::addAll begin";
std::list<GrpPeptide *>::iterator it(m_peptidePtrList.begin());
std::list<GrpPeptide *>::iterator itEnd(m_peptidePtrList.end());
std::list<GrpPeptide *>::const_iterator itIn(
peptideSetIn.m_peptidePtrList.begin());
std::list<GrpPeptide *>::const_iterator itInEnd(
peptideSetIn.m_peptidePtrList.end());
while((itIn != itInEnd) && (it != itEnd))
{
if(*itIn > *it)
{
it++;
continue;
}
if(*itIn < *it)
{
it = m_peptidePtrList.insert(it, *itIn);
it++;
itIn++;
continue;
}
if(*itIn == *it)
{
itIn++;
it++;
}
}
while(itIn != itInEnd)
{
m_peptidePtrList.push_back(*itIn);
itIn++;
}
qDebug() << "GrpPeptideSet::addAll end";
}

References m_peptidePtrList.

Referenced by pappso::GrpGroup::GrpGroup(), pappso::GrpExperiment::addPostGroupingGrpProteinSpRemoval(), pappso::GrpExperiment::addPreGroupingGrpProteinSpRemoval(), and pappso::GrpGroup::addSubGroupSp().

## biggerAndContainsAll()

bool GrpPeptideSet::biggerAndContainsAll | ( | const GrpPeptideSet & | peptideSet | ) | const

Definition at line 90 of file grppeptideset.cpp.

{
if(m_peptidePtrList.size() > peptideSetIn.m_peptidePtrList.size())
{
return privContainsAll(peptideSetIn);
}
return false;
}
pappso::GrpPeptideSet::privContainsAll
bool privContainsAll(const GrpPeptideSet &peptideSetIn) const
Definition grppeptideset.cpp:100

References m_peptidePtrList, and privContainsAll().

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

## contains()

bool GrpPeptideSet::contains | ( | const GrpPeptide * | p_grp_peptide | ) | const

Definition at line 68 of file grppeptideset.cpp.

{
if(std::find(m_peptidePtrList.begin(),
m_peptidePtrList.end(),
p_grp_peptide) == m_peptidePtrList.end())
{
return false;
}
return true;
}

References m_peptidePtrList.

## containsAll()

bool GrpPeptideSet::containsAll | ( | const GrpPeptideSet & | peptideSet | ) | const

Definition at line 80 of file grppeptideset.cpp.

{
if(m_peptidePtrList.size() < peptideSetIn.m_peptidePtrList.size())
{
return false;
}
return privContainsAll(peptideSetIn);
}

References m_peptidePtrList, and privContainsAll().

## containsAny()

bool GrpPeptideSet::containsAny | ( | const GrpPeptideSet & | peptideSet | ) | const

Definition at line 134 of file grppeptideset.cpp.

{
std::list<GrpPeptide *>::const_iterator innerIt, outerIt, innerEnd, outerEnd;
innerIt = peptideSetIn.m_peptidePtrList.begin();
innerEnd = peptideSetIn.m_peptidePtrList.end();
outerIt = m_peptidePtrList.begin();
outerEnd = m_peptidePtrList.end();
while((innerIt != innerEnd) && (outerIt != outerEnd))
{
if(*innerIt > *outerIt)
{
outerIt++;
continue;
}
if(*innerIt < *outerIt)
{
innerIt++;
continue;
}
if(*innerIt == *outerIt)
{
return true;
}
}
return false;
}

References m_peptidePtrList.

Referenced by pappso::GrpGroup::containsAny().

## getGrpPeptideList()

std::vector< const GrpPeptide * > GrpPeptideSet::getGrpPeptideList | ( |  | ) | const

Definition at line 237 of file grppeptideset.cpp.

{
std::vector<const GrpPeptide *> peptide_list;
for(GrpPeptide *peptide : m_peptidePtrList)
{
peptide_list.push_back(peptide);
}
return peptide_list;
}
pappso::GrpPeptide
Definition grppeptide.h:43

References m_peptidePtrList.

## numbering()

void GrpPeptideSet::numbering | ( |  | ) |

Definition at line 206 of file grppeptideset.cpp.

{
qDebug() << "GrpPeptideSet::numbering begin";
m_peptidePtrList.sort([](GrpPeptide *first, GrpPeptide *second) {
return ((*first) < (*second));
});
unsigned int i = 1;
for(auto &&p_grp_peptide : m_peptidePtrList)
{
p_grp_peptide->setRank(i);
i++;
}
qDebug() << "GrpPeptideSet::numbering end";
}

References m_peptidePtrList.

Referenced by pappso::GrpGroup::numbering().

## operator=()

GrpPeptideSet & GrpPeptideSet::operator= | ( | const GrpPeptideSet & | other | ) |

Definition at line 51 of file grppeptideset.cpp.

{
m_peptidePtrList = other.m_peptidePtrList;
return *this;
}

References m_peptidePtrList.

## operator==()

bool GrpPeptideSet::operator== | ( | const GrpPeptideSet & | other | ) | const

Definition at line 58 of file grppeptideset.cpp.

{
if(m_peptidePtrList.size() != other.m_peptidePtrList.size())
{
return false;
}
return privContainsAll(other);
}

References m_peptidePtrList, and privContainsAll().

## printInfos()

const QString GrpPeptideSet::printInfos | ( |  | ) | const

Definition at line 248 of file grppeptideset.cpp.

{
QString infos;
std::list<GrpPeptide *>::const_iterator it(m_peptidePtrList.begin()),
itEnd(m_peptidePtrList.end());
while(it != itEnd)
{
infos.append((*it)->getSequence() + " " +
QString("0x%1").arg(
(quintptr)*it, QT_POINTER_SIZE * 2, 16, QChar('0')) +
"\n");
it++;
}
return infos;
}

References m_peptidePtrList.

Referenced by pappso::GrpGroup::check().

## privContainsAll()

bool GrpPeptideSet::privContainsAll | ( | const GrpPeptideSet & | peptideSetIn | ) | const

private

Definition at line 100 of file grppeptideset.cpp.

{
std::list<GrpPeptide *>::const_iterator innerIt, outerIt, innerEnd, outerEnd;
innerIt = peptideSetIn.m_peptidePtrList.begin();
innerEnd = peptideSetIn.m_peptidePtrList.end();
outerIt = m_peptidePtrList.begin();
outerEnd = m_peptidePtrList.end();
while((innerIt != innerEnd) && (outerIt != outerEnd))
{
if(*innerIt > *outerIt)
{
outerIt++;
continue;
}
if(*innerIt < *outerIt)
{
return false;
}
if(*innerIt == *outerIt)
{
innerIt++;
outerIt++;
}
}
if(innerIt == innerEnd)
{
return true;
}
return false;
}

References m_peptidePtrList.

Referenced by biggerAndContainsAll(), containsAll(), and operator==().

## setGroupNumber()

void GrpPeptideSet::setGroupNumber | ( | unsigned int | i | ) |

Definition at line 225 of file grppeptideset.cpp.

{
qDebug() << "GrpPeptideSet::setGroupNumber begin";
for(auto &&p_grp_peptide : m_peptidePtrList)
{
p_grp_peptide->setGroupNumber(i);
}
qDebug() << "GrpPeptideSet::setGroupNumber end";
}

References m_peptidePtrList.

Referenced by pappso::GrpGroup::setGroupNumber().

## size()

unsigned int pappso::GrpPeptideSet::size | ( |  | ) | const

inline

Definition at line 54 of file grppeptideset.h.

{
return m_peptidePtrList.size();
};

References m_peptidePtrList.

Referenced by pappso::GrpSubGroup::merge(), pappso::GrpSubGroup::operator<(), pappso::GrpSubGroup::peptideListSize(), and pappso::GrpExperiment::startGrouping().

## Friends And Related Symbol Documentation

## GrpMapPeptideToGroup

friend class GrpMapPeptideToGroup

friend

Definition at line 38 of file grppeptideset.h.

## GrpMapPeptideToSubGroupSet

friend class GrpMapPeptideToSubGroupSet

friend

Definition at line 37 of file grppeptideset.h.

## Member Data Documentation

## m_peptidePtrList

std::list<GrpPeptide *> pappso::GrpPeptideSet::m_peptidePtrList

private

Definition at line 41 of file grppeptideset.h.

Referenced by GrpPeptideSet(), pappso::GrpMapPeptideToSubGroupSet::add(), addAll(), biggerAndContainsAll(), contains(), containsAll(), containsAny(), pappso::GrpMapPeptideToGroup::getGroupList(), getGrpPeptideList(), pappso::GrpMapPeptideToSubGroupSet::getSubGroupSet(), pappso::GrpMapPeptideToSubGroupSet::hasSpecificPeptide(), numbering(), operator=(), operator==(), printInfos(), privContainsAll(), pappso::GrpMapPeptideToSubGroupSet::remove(), pappso::GrpMapPeptideToGroup::set(), setGroupNumber(), and size().

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

- pappsomspp/grouping/grppeptideset.h
- pappsomspp/grouping/grppeptideset.cpp