48GrpMapPeptideToSubGroupSet::GrpMapPeptideToSubGroupSet::size()
const
50 return m_mapPeptideToSubGroupSet.size();
57 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet begin ";
59 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
62 for(
auto it_peptide = peptide_set_in.
m_peptidePtrList.begin(); it_peptide != it_peptide_end;
65 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
67 if(it_map != it_map_end)
69 impacted_subgroup_set.
addAll(it_map->second);
72 qDebug() <<
"GrpMapPeptideToSubGroupSet::getSubGroupSet end ";
77 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
79 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before test.size() " << test.
size();
83 qDebug() <<
"GrpMapPeptideToSubGroupSet::std before peptide " << pair.first->getSequence()
89 test.
remove(sub_group_sp.get());
91 qDebug() <<
"GrpMapPeptideToSubGroupSet::std after test.size() " << test.
size();
93 qDebug() <<
"GrpMapPeptideToSubGroupSet::std begin ";
99 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove begin "
106 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
109 for(
auto it_peptide = peptide_set_in.
m_peptidePtrList.begin(); it_peptide != it_peptide_end;
112 std::map<GrpPeptide *, GrpSubGroupSet>::iterator it_map =
114 if(it_map != it_map_end)
116 it_map->second.remove(p_remove_sub_group);
117 if(it_map->second.size() == 0)
124 throw PappsoException(QObject::tr(
"remove ERROR, peptide %1 from subgroup %2 not "
125 "referenced in GrpMapPeptideToSubGroupSet")
126 .arg((*it_peptide)->getSequence())
131 qDebug() <<
"GrpMapPeptideToSubGroupSet::remove end " << p_remove_sub_group->
getFirstAccession();
136 qDebug() <<
"GrpMapPeptideToSubGroupSet::add begin m_mapPeptideToSubGroupSet.size()"
144 for(
auto it_peptide = peptide_set_in.
m_peptidePtrList.begin(); it_peptide != it_peptide_end;
147 std::pair<std::map<GrpPeptide *, GrpSubGroupSet>::iterator,
bool> ret =
149 std::pair<GrpPeptide *, GrpSubGroupSet>(*it_peptide,
GrpSubGroupSet()));
151 ret.first->second.add(p_add_sub_group);
154 qDebug() <<
"GrpMapPeptideToSubGroupSet::add end";
161 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide begin";
166 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map_end =
169 for(
auto it_peptide = peptide_set_in.
m_peptidePtrList.begin(); it_peptide != it_peptide_end;
172 std::map<GrpPeptide *, GrpSubGroupSet>::const_iterator it_map =
174 if(it_map != it_map_end)
176 if(it_map->second.size() == 1)
183 throw PappsoException(QObject::tr(
"hasSpecificPeptide ERROR, peptide %1 from subgroup %2 "
184 "not referenced in GrpMapPeptideToSubGroupSet")
185 .arg((*it_peptide)->getSequence())
190 qDebug() <<
"GrpMapPeptideToSubGroupSet::hasSpecificPeptide end";
201 while(itMap != itMapEnd)
204 itMap->first->getSequence() +
" " +
205 QString(
"0x%1").arg((quintptr)itMap->first, QT_POINTER_SIZE * 2, 16, QChar(
'0')) +
"\n");
~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