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

`#include <grpmappeptidetogroup.h>`

## Public Member Functions

| GrpMapPeptideToGroup ()
| GrpMapPeptideToGroup (const GrpMapPeptideToGroup &other)
| ~GrpMapPeptideToGroup ()
void | getGroupList (const GrpPeptideSet &peptide_set_in, std::list< GrpGroupSp > &impacted_group_list) const
| get all groups concerned by a list of peptides
void | set (const GrpPeptideSet &peptide_set_in, GrpGroupSp grp_group)
| set peptide keys pointing on the group
void | clear (std::list< GrpGroupSp > &grp_group_list)

## Private Attributes

std::map< GrpPeptide *, GrpGroupSp > | m_mapPeptideToGroup

## Detailed Description

Definition at line 42 of file grpmappeptidetogroup.h.

## Constructor & Destructor Documentation

## GrpMapPeptideToGroup() [1/2]

pappso::GrpMapPeptideToGroup::GrpMapPeptideToGroup | ( |  | ) |

Definition at line 36 of file grpmappeptidetogroup.cpp.

{
}

## GrpMapPeptideToGroup() [2/2]

pappso::GrpMapPeptideToGroup::GrpMapPeptideToGroup | ( | const GrpMapPeptideToGroup & | other | ) |

Definition at line 40 of file grpmappeptidetogroup.cpp.

: m_mapPeptideToGroup(other.m_mapPeptideToGroup)
{
}
pappso::GrpMapPeptideToGroup::m_mapPeptideToGroup
std::map< GrpPeptide *, GrpGroupSp > m_mapPeptideToGroup
Definition grpmappeptidetogroup.h:45

## ~GrpMapPeptideToGroup()

pappso::GrpMapPeptideToGroup::~GrpMapPeptideToGroup | ( |  | ) |

Definition at line 45 of file grpmappeptidetogroup.cpp.

{
}

## Member Function Documentation

## clear()

void pappso::GrpMapPeptideToGroup::clear | ( | std::list< GrpGroupSp > & | grp_group_list | ) |

Definition at line 94 of file grpmappeptidetogroup.cpp.

{
std::list<GrpGroupSp> new_list;
for(auto &pair_map : m_mapPeptideToGroup)
{
new_list.push_back(pair_map.second);
}
new_list.sort();
new_list.unique();
grp_group_list.splice(grp_group_list.end(), new_list);
m_mapPeptideToGroup.clear();
}

References m_mapPeptideToGroup.

Referenced by pappso::GrpExperiment::removeNonInformativeSubGroups(), and pappso::GrpExperiment::startGrouping().

## getGroupList()

void pappso::GrpMapPeptideToGroup::getGroupList | ( | const GrpPeptideSet & | peptide_set_in,
|  | std::list< GrpGroupSp > & | impacted_group_list
| ) |  | const

get all groups concerned by a list of peptides

Definition at line 50 of file grpmappeptidetogroup.cpp.

{
auto it_peptide_end = peptide_set_in.m_peptidePtrList.end();
std::map<GrpPeptide *, GrpGroupSp>::const_iterator it_map_end =
m_mapPeptideToGroup.end();
for(auto it_peptide = peptide_set_in.m_peptidePtrList.begin();
it_peptide != it_peptide_end;
it_peptide++)
{
std::map<GrpPeptide *, GrpGroupSp>::const_iterator it_map =
m_mapPeptideToGroup.find(*it_peptide);
if(it_map != it_map_end)
{
impacted_group_list.push_back(it_map->second);
}
}
impacted_group_list.sort();
impacted_group_list.unique();
}

References m_mapPeptideToGroup, and pappso::GrpPeptideSet::m_peptidePtrList.

Referenced by pappso::GrpExperiment::addSubGroupSp().

## set()

void pappso::GrpMapPeptideToGroup::set | ( | const GrpPeptideSet & | peptide_set_in,
|  | GrpGroupSp | grp_group
| ) |  |

set peptide keys pointing on the group

Definition at line 74 of file grpmappeptidetogroup.cpp.

{
auto it_peptide_end = peptide_set_in.m_peptidePtrList.end();
for(auto it_peptide = peptide_set_in.m_peptidePtrList.begin();
it_peptide != it_peptide_end;
it_peptide++)
{
std::pair<std::map<GrpPeptide *, GrpGroupSp>::iterator, bool> ret =
m_mapPeptideToGroup.insert(
std::pair<GrpPeptide *, GrpGroupSp>(*it_peptide, grp_group));
if(ret.second == false)
{ //=> key already exists : replace by grp_group
ret.first->second = grp_group;
}
}
}

References m_mapPeptideToGroup, and pappso::GrpPeptideSet::m_peptidePtrList.

Referenced by pappso::GrpExperiment::addSubGroupSp().

## Member Data Documentation

## m_mapPeptideToGroup

std::map<GrpPeptide *, GrpGroupSp> pappso::GrpMapPeptideToGroup::m_mapPeptideToGroup

private

Definition at line 45 of file grpmappeptidetogroup.h.

Referenced by clear(), getGroupList(), and set().

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

- pappsomspp/grouping/grpmappeptidetogroup.h
- pappsomspp/grouping/grpmappeptidetogroup.cpp