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

display not valid peptides, warning : bug counting valid peptides per msrun

parent 39ec86b5
No related branches found
No related tags found
No related merge requests found
...@@ -29,8 +29,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5 ...@@ -29,8 +29,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5
#sudo apt-get install libpappsomspp-dev #sudo apt-get install libpappsomspp-dev
#FIND_PACKAGE( Pappsomspp REQUIRED ) #FIND_PACKAGE( Pappsomspp REQUIRED )
SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp") # SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp") SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src") SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so") SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so")
......
...@@ -63,19 +63,23 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto ...@@ -63,19 +63,23 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto
else { else {
std::pair<std::map<const pappso::MsRunId*, unsigned int>::iterator,bool> ret = _count_per_msrun.insert(std::pair<const pappso::MsRunId*, unsigned int>(p_peptide_match->getMsRunIdSp().get(),0)); std::pair<std::map<const pappso::MsRunId*, unsigned int>::iterator,bool> ret = _count_per_msrun.insert(std::pair<const pappso::MsRunId*, unsigned int>(p_peptide_match->getMsRunIdSp().get(),0));
ret.first->second +=1; ret.first->second +=1;
if (ret.first->second > _number_of_valid_peptides) {
_number_of_valid_peptides = ret.first->second;
}
} }
} }
} }
} }
for (auto && pair_msrun_count : _count_per_msrun) {
if (pair_msrun_count.second > _number_of_valid_peptides) {
_number_of_valid_peptides = pair_msrun_count.second;
}
}
//update protein evalue ? //update protein evalue ?
if (_number_of_valid_peptides >= automatic_filter_parameters.getFilterMinimumPeptidePerMatch()) { if (_number_of_valid_peptides < automatic_filter_parameters.getFilterMinimumPeptidePerMatch()) {
}
else {
if (_evalue <= automatic_filter_parameters.getFilterProteinEvalue()) { if (_evalue <= automatic_filter_parameters.getFilterProteinEvalue()) {
_proxy_valid = true; _proxy_valid = true;
} }
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "peptidetablemodel.h" #include "peptidetablemodel.h"
#include <QDebug> #include <QDebug>
#include <QColor>
#include <pappsomspp/grouping/grppeptide.h> #include <pappsomspp/grouping/grppeptide.h>
...@@ -145,6 +146,12 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const { ...@@ -145,6 +146,12 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const {
} }
} }
break; break;
case Qt::BackgroundRole:
if (_p_protein_match->getPeptideMatchList().at(row)->isValid() == false)
{
return QVariant(QColor("grey"));
}
break;
case Qt::DisplayRole: case Qt::DisplayRole:
if (_p_protein_match == nullptr) { if (_p_protein_match == nullptr) {
} }
...@@ -203,5 +210,5 @@ bool PeptideTableModel::acceptRow(int source_row) { ...@@ -203,5 +210,5 @@ bool PeptideTableModel::acceptRow(int source_row) {
if (_p_protein_match->getPeptideMatchList().at(source_row)->isValid()) { if (_p_protein_match->getPeptideMatchList().at(source_row)->isValid()) {
return true; return true;
} }
return false; return true;
} }
...@@ -188,7 +188,10 @@ void ProteinListWindow::setIdentificationGroup(IdentificationGroup * p_identific ...@@ -188,7 +188,10 @@ void ProteinListWindow::setIdentificationGroup(IdentificationGroup * p_identific
} }
void ProteinListWindow::updateStatusBar() { void ProteinListWindow::updateStatusBar() {
if (_p_identification_group == nullptr) {
}
else {
ui->statusbar->showMessage(tr("proteins %1 valid, %2 checked, %3 displayed").arg(_p_identification_group->countValid()).arg(_p_identification_group->countValidAndChecked()).arg(_p_proxy_model->rowCount())); ui->statusbar->showMessage(tr("proteins %1 valid, %2 checked, %3 displayed").arg(_p_identification_group->countValid()).arg(_p_identification_group->countValidAndChecked()).arg(_p_proxy_model->rowCount()));
}
} }
...@@ -74,7 +74,7 @@ protected : ...@@ -74,7 +74,7 @@ protected :
private: private:
IdentificationGroup * _p_identification_group; IdentificationGroup * _p_identification_group=nullptr;
Ui::ProteinView *ui; Ui::ProteinView *ui;
ProteinTableModel * _protein_table_model_p = nullptr; ProteinTableModel * _protein_table_model_p = nullptr;
ProteinTableProxyModel * _p_proxy_model = nullptr; ProteinTableProxyModel * _p_proxy_model = nullptr;
......
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