Skip to content
Snippets Groups Projects
Commit e38289d2 authored by Langella Olivier's avatar Langella Olivier
Browse files

display number of ptm groups and subgroups

parent 340ba1f8
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,14 @@ PtmGroupingExperiment::~PtmGroupingExperiment() ...@@ -74,6 +74,14 @@ PtmGroupingExperiment::~PtmGroupingExperiment()
} }
const std::vector<PtmIslandSubgroupSp> & PtmGroupingExperiment::getPtmIslandSubgroupList() const {
return _ptm_island_subgroup_list;
}
const std::vector<PtmIslandGroupSp> & PtmGroupingExperiment::getPtmIslandGroupList() const {
return _ptm_island_group_list;
}
const std::vector<PtmIslandSp> & PtmGroupingExperiment::getPtmIslandList() const { const std::vector<PtmIslandSp> & PtmGroupingExperiment::getPtmIslandList() const {
qDebug() << "PtmGroupingExperiment::getPtmIslandList begin" << _ptm_island_list.size(); qDebug() << "PtmGroupingExperiment::getPtmIslandList begin" << _ptm_island_list.size();
return _ptm_island_list; return _ptm_island_list;
...@@ -169,19 +177,19 @@ unsigned int PtmGroupingExperiment::countPeptideMatchPtm(const PeptideMatch & pe ...@@ -169,19 +177,19 @@ unsigned int PtmGroupingExperiment::countPeptideMatchPtm(const PeptideMatch & pe
std::vector<unsigned int> PtmGroupingExperiment::getPtmPositions(const PeptideMatch & peptide_match) const { std::vector<unsigned int> PtmGroupingExperiment::getPtmPositions(const PeptideMatch & peptide_match) const {
std::vector<unsigned int> position_list; std::vector<unsigned int> position_list;
for (const ModificationAndAa & modification: _modification_list) { for (const ModificationAndAa & modification: _modification_list) {
if (modification.aa_list.size() == 0) { if (modification.aa_list.size() == 0) {
for (unsigned int position : peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->getModificationPositionList(modification.modification)) { for (unsigned int position : peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->getModificationPositionList(modification.modification)) {
position_list.push_back(position); position_list.push_back(position);
}
} }
else { }
for (unsigned int position : peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->getModificationPositionList(modification.modification, modification.aa_list)) { else {
position_list.push_back(position); for (unsigned int position : peptide_match.getPeptideEvidence()->getPeptideXtpSp().get()->getModificationPositionList(modification.modification, modification.aa_list)) {
} position_list.push_back(position);
} }
} }
}
std::sort(position_list.begin(), position_list.end()); std::sort(position_list.begin(), position_list.end());
auto last = std::unique(position_list.begin(), position_list.end()); auto last = std::unique(position_list.begin(), position_list.end());
position_list.erase(last, position_list.end()); position_list.erase(last, position_list.end());
......
...@@ -54,8 +54,19 @@ public: ...@@ -54,8 +54,19 @@ public:
void setValidationState(ValidationState validation_state); void setValidationState(ValidationState validation_state);
void addProteinMatch(const ProteinMatch* p_protein_match); void addProteinMatch(const ProteinMatch* p_protein_match);
void startGrouping(); void startGrouping();
/** @brief get the ptm island subgroup list
*/
const std::vector<PtmIslandSubgroupSp> & getPtmIslandSubgroupList() const;
/** @brief get the ptm island group list
*/
const std::vector<PtmIslandGroupSp> & getPtmIslandGroupList() const;
/** @brief get the ptm island list
*/
const std::vector<PtmIslandSp> & getPtmIslandList() const; const std::vector<PtmIslandSp> & getPtmIslandList() const;
/** @brief count number of modifications in a PeptideMatch /** @brief count number of modifications in a PeptideMatch
* */ * */
unsigned int countPeptideMatchPtm(const PeptideMatch & peptide_match)const; unsigned int countPeptideMatchPtm(const PeptideMatch & peptide_match)const;
......
...@@ -55,13 +55,13 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent): ...@@ -55,13 +55,13 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent):
ui->ptm_island_tableview->setAlternatingRowColors(true); ui->ptm_island_tableview->setAlternatingRowColors(true);
_statusbar_displayed_label = new QLabel("");
ui->statusbar->addWidget(_statusbar_displayed_label);
_statusbar_ptm_islands_label = new QLabel(""); _statusbar_ptm_islands_label = new QLabel("");
ui->statusbar->addWidget(_statusbar_ptm_islands_label); ui->statusbar->addWidget(_statusbar_ptm_islands_label);
_statusbar_displayed_label = new QLabel("");
ui->statusbar->addWidget(_statusbar_displayed_label);
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
// Qt5 code // Qt5 code
connect (this, &PtmIslandListWindow::ptmIslandDataChanged, _ptm_table_model_p, &PtmIslandTableModel::onPtmIslandDataChanged); connect (this, &PtmIslandListWindow::ptmIslandDataChanged, _ptm_table_model_p, &PtmIslandTableModel::onPtmIslandDataChanged);
...@@ -129,7 +129,8 @@ void PtmIslandListWindow::doIdentificationPtmGroupGrouped(IdentificationGroup * ...@@ -129,7 +129,8 @@ void PtmIslandListWindow::doIdentificationPtmGroupGrouped(IdentificationGroup *
_ptm_table_model_p->setIdentificationGroup(p_identification_group); _ptm_table_model_p->setIdentificationGroup(p_identification_group);
emit ptmIslandDataChanged(); emit ptmIslandDataChanged();
_statusbar_ptm_islands_label->setText(tr("ptm islands: %1").arg(p_identification_group->getPtmGroupingExperiment()->getPtmIslandList().size())); const PtmGroupingExperiment * p_ptm_grouping_experiment = p_identification_group->getPtmGroupingExperiment();
_statusbar_ptm_islands_label->setText(tr("ptm island groups:%1 ptm island subgroups:%2 ptm islands:%3").arg(p_ptm_grouping_experiment->getPtmIslandGroupList().size()).arg(p_ptm_grouping_experiment->getPtmIslandSubgroupList().size()).arg(p_ptm_grouping_experiment->getPtmIslandList().size()));
//ui->ptm_island_tableview->resizeRowToContents(_ptm_table_model_p->rowCount()); //ui->ptm_island_tableview->resizeRowToContents(_ptm_table_model_p->rowCount());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment