30 #include "../pappsoexception.h"
45 : m_mapPeptideToSubGroupSet(other.m_mapPeptideToSubGroupSet)
49 GrpMapPeptideToSubGroupSet::GrpMapPeptideToSubGroupSet::size()
const
51 return m_mapPeptideToSubGroupSet.size();
59 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet begin ";
61 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
65 it_peptide != it_peptide_end;
68 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
70 if(it_map != it_map_end)
72 impacted_subgroup_set.
addAll(it_map->second);
75 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet end ";
79 std::list<GrpSubGroupSp> &m_grpSubGroupSpList)
const
81 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
83 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before test.size() "
88 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before peptide "
89 << pair.first->getSequence() <<
" " << pair.first;
94 test.
remove(sub_group_sp.get());
96 qDebug() <<
"GrpMapPeptideToSubGroupSet::std after test.size() "
99 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
105 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove begin "
112 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
116 it_peptide != it_peptide_end;
119 std::map<GrpPeptide *, GrpSubGroupSet>::iterator it_map =
121 if(it_map != it_map_end)
123 it_map->second.remove(p_remove_sub_group);
124 if(it_map->second.size() == 0)
132 QObject::tr(
"remove ERROR, peptide %1 from subgroup %2 not "
133 "referenced in GrpMapPeptideToSubGroupSet")
134 .arg((*it_peptide)->getSequence())
139 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove end "
146 <<
"GrpMapPeptideToSubGroupSet::add begin m_mapPeptideToSubGroupSet.size()"
155 it_peptide != it_peptide_end;
158 std::pair<std::map<GrpPeptide *, GrpSubGroupSet>::iterator,
bool> ret =
160 std::pair<GrpPeptide *, GrpSubGroupSet>(*it_peptide,
163 ret.first->second.add(p_add_sub_group);
166 qDebug() <<
"GrpMapPeptideToSubGroupSet::add end";
174 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide begin";
179 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
183 it_peptide != it_peptide_end;
186 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
188 if(it_map != it_map_end)
190 if(it_map->second.size() == 1)
198 QObject::tr(
"hasSpecificPeptide ERROR, peptide %1 from subgroup %2 "
199 "not referenced in GrpMapPeptideToSubGroupSet")
200 .arg((*it_peptide)->getSequence())
205 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide end";
216 while(itMap != itMapEnd)
219 itMap->first->getSequence() +
" " +
221 (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