28#include "../pappsoexception.h"
43 : m_mapPeptideToSubGroupSet(other.m_mapPeptideToSubGroupSet)
47GrpMapPeptideToSubGroupSet::GrpMapPeptideToSubGroupSet::size()
const
49 return m_mapPeptideToSubGroupSet.size();
57 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet begin ";
59 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
63 it_peptide != it_peptide_end;
66 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
68 if(it_map != it_map_end)
70 impacted_subgroup_set.
addAll(it_map->second);
73 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet end ";
77 std::list<GrpSubGroupSp> &m_grpSubGroupSpList)
const
79 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
81 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before test.size() "
86 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before peptide "
87 << pair.first->getSequence() <<
" " << pair.first;
92 test.
remove(sub_group_sp.get());
94 qDebug() <<
"GrpMapPeptideToSubGroupSet::std after test.size() "
97 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
103 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove begin "
110 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
114 it_peptide != it_peptide_end;
117 std::map<GrpPeptide *, GrpSubGroupSet>::iterator it_map =
119 if(it_map != it_map_end)
121 it_map->second.remove(p_remove_sub_group);
122 if(it_map->second.size() == 0)
130 QObject::tr(
"remove ERROR, peptide %1 from subgroup %2 not "
131 "referenced in GrpMapPeptideToSubGroupSet")
132 .arg((*it_peptide)->getSequence())
137 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove end "
144 <<
"GrpMapPeptideToSubGroupSet::add begin m_mapPeptideToSubGroupSet.size()"
153 it_peptide != it_peptide_end;
156 std::pair<std::map<GrpPeptide *, GrpSubGroupSet>::iterator,
bool> ret =
158 std::pair<GrpPeptide *, GrpSubGroupSet>(*it_peptide,
161 ret.first->second.add(p_add_sub_group);
164 qDebug() <<
"GrpMapPeptideToSubGroupSet::add end";
172 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide begin";
177 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
181 it_peptide != it_peptide_end;
184 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
186 if(it_map != it_map_end)
188 if(it_map->second.size() == 1)
196 QObject::tr(
"hasSpecificPeptide ERROR, peptide %1 from subgroup %2 "
197 "not referenced in GrpMapPeptideToSubGroupSet")
198 .arg((*it_peptide)->getSequence())
203 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide end";
214 while(itMap != itMapEnd)
217 itMap->first->getSequence() +
" " +
219 (quintptr)itMap->first, QT_POINTER_SIZE * 2, 16, QChar(
'0')) +
~GrpMapPeptideToSubGroupSet()
bool hasSpecificPeptide(const GrpSubGroup *get) const
tells if this subgroup contains a specific peptide
GrpMapPeptideToSubGroupSet()
unsigned int size() const
void check(std::list< GrpSubGroupSp > &m_grpSubGroupSpList) const
check function only usefull for testing purpose
void getSubGroupSet(const GrpPeptideSet &peptide_set_in, GrpSubGroupSet &impacted_subgroup_set) const
get all subgroups concerned by a list of peptides
void remove(GrpSubGroup *p_remove_sub_group)
removes in the map all references of the group to remove (p_remove_sub_group)
const QString printInfos() const
std::map< GrpPeptide *, GrpSubGroupSet > m_mapPeptideToSubGroupSet
void add(GrpSubGroup *p_add_sub_group)
add in the map all peptides of the subgroup to add
std::list< GrpPeptide * > m_peptidePtrList
void addAll(const GrpSubGroupSet &other)
const GrpPeptideSet & getPeptideSet() const
const QString & getFirstAccession() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< GrpSubGroup > GrpSubGroupSp