diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f5d3bbcbd1ad87ee62ba85c8dbcb6dc0359f458..4617222382e4525867e60dc612152ff20643d433 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,8 +29,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5 #sudo apt-get install libpappsomspp-dev #FIND_PACKAGE( Pappsomspp REQUIRED ) -SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp") -# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp") +# SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp") + SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp") SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src") SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so") diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp index eae99e21e38679c6203d2047cf7b258849a2ab28..fc62465f66de9d1915acc35b6c1eb817c7afe4ec 100644 --- a/src/core/proteinmatch.cpp +++ b/src/core/proteinmatch.cpp @@ -63,19 +63,23 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto 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)); 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 ? - 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()) { _proxy_valid = true; } diff --git a/src/gui/peptide_list_view/peptidetablemodel.cpp b/src/gui/peptide_list_view/peptidetablemodel.cpp index adb3894581507ea79da835d5b2b703fbd5701b98..65e5bbc1c685ff47a427249b6a63c3afe8af1bde 100644 --- a/src/gui/peptide_list_view/peptidetablemodel.cpp +++ b/src/gui/peptide_list_view/peptidetablemodel.cpp @@ -24,6 +24,7 @@ #include "peptidetablemodel.h" #include <QDebug> +#include <QColor> #include <pappsomspp/grouping/grppeptide.h> @@ -145,6 +146,12 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const { } } break; + case Qt::BackgroundRole: + if (_p_protein_match->getPeptideMatchList().at(row)->isValid() == false) + { + return QVariant(QColor("grey")); + } + break; case Qt::DisplayRole: if (_p_protein_match == nullptr) { } @@ -203,5 +210,5 @@ bool PeptideTableModel::acceptRow(int source_row) { if (_p_protein_match->getPeptideMatchList().at(source_row)->isValid()) { return true; } - return false; + return true; } diff --git a/src/gui/protein_list_view/proteinlistwindow.cpp b/src/gui/protein_list_view/proteinlistwindow.cpp index 00348a5aa4bd3e33301b2a5a02c380b8ad212068..6fe75065a4d2505822858d746fa3b13839b20f9c 100644 --- a/src/gui/protein_list_view/proteinlistwindow.cpp +++ b/src/gui/protein_list_view/proteinlistwindow.cpp @@ -188,7 +188,10 @@ void ProteinListWindow::setIdentificationGroup(IdentificationGroup * p_identific } 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())); - + } } diff --git a/src/gui/protein_list_view/proteinlistwindow.h b/src/gui/protein_list_view/proteinlistwindow.h index 268939d4f252c5bb861d79f36c4a552de5d6c105..4ce0985f94636ecf5b9711cd4021a43b4bf45698 100644 --- a/src/gui/protein_list_view/proteinlistwindow.h +++ b/src/gui/protein_list_view/proteinlistwindow.h @@ -74,7 +74,7 @@ protected : private: - IdentificationGroup * _p_identification_group; + IdentificationGroup * _p_identification_group=nullptr; Ui::ProteinView *ui; ProteinTableModel * _protein_table_model_p = nullptr; ProteinTableProxyModel * _p_proxy_model = nullptr;