diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bc8c3534f2d9ad1261fab6a9846a492f03e0e5b..e7f5f5a40729d02caab735060f09a47e729cacd9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,11 +28,11 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5 #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/langella/developpement/git/pappsomspp") - #SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src") - #SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/build/src/libpappsomspp-qt4.so") + 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") INCLUDE_DIRECTORIES( ${PAPPSOMSPP_INCLUDE_DIR} ) diff --git a/src/core/peptidematch.cpp b/src/core/peptidematch.cpp index 718d2e02591040041d1af213b7871797f1956a15..03d83fd1a513e009791fa4abc64d204fb9a9ef75 100644 --- a/src/core/peptidematch.cpp +++ b/src/core/peptidematch.cpp @@ -32,7 +32,7 @@ void PeptideMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto _proxy_valid = false; if (_evalue <= automatic_filter_parameters.getFilterPeptideEvalue()) { - _proxy_valid = true; + _proxy_valid = true; } } void PeptideMatch::setRetentionTime(pappso::pappso_double rt) { @@ -70,7 +70,7 @@ bool PeptideMatch::isChecked() const { return _checked; } -bool PeptideMatch::isValidAndChecked() const{ +bool PeptideMatch::isValidAndChecked() const { return _proxy_valid && _checked; } void PeptideMatch::setIdentificationDataSource(IdentificationDataSource* identification_source) { @@ -89,10 +89,17 @@ unsigned int PeptideMatch::getCharge() const { return _charge; } -pappso::PeptideSp PeptideMatch::getPeptideSp() const { +const pappso::PeptideSp & PeptideMatch::getPeptideSp() const { return _peptide_sp; } const pappso::MsRunIdSp & PeptideMatch::getMsRunIdSp() const { - return _msrunid_sp; -} \ No newline at end of file + return _msrunid_sp; +} +void PeptideMatch::setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide) { + _sp_grp_peptide =sp_grp_peptide; +} + + const pappso::GrpPeptideSp & PeptideMatch::getGrpPeptideSp() const { + return _sp_grp_peptide; + } \ No newline at end of file diff --git a/src/core/peptidematch.h b/src/core/peptidematch.h index 8d8f2664116bbb55f8d06be217ee6c0e14334531..0a03107a14bb537364b9ce865931b0155305f8b7 100644 --- a/src/core/peptidematch.h +++ b/src/core/peptidematch.h @@ -29,6 +29,8 @@ #include "identification_sources/identificationdatasource.h" #include "automaticfilterparameters.h" +#include "../grouping/groupingexperiment.h" + class PeptideMatch { public : @@ -51,8 +53,11 @@ public : unsigned int getScan() const; pappso::pappso_double getRetentionTime() const; unsigned int getCharge() const; - pappso::PeptideSp getPeptideSp() const; + const pappso::PeptideSp & getPeptideSp() const; pappso::pappso_double getEvalue() const; + + void setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide); + const pappso::GrpPeptideSp & getGrpPeptideSp() const; /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks * */ @@ -61,6 +66,7 @@ public : private : pappso::MsRunIdSp _msrunid_sp; unsigned int _scan; + pappso::GrpPeptideSp _sp_grp_peptide; pappso::PeptideSp _peptide_sp; pappso::pappso_double _rt; pappso::pappso_double _evalue; diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp index 31181bb787ee71a0bd2993ababb68fcedad02cfe..f8b124f2caecca2238ecfffdb25aff69181623c0 100644 --- a/src/core/proteinmatch.cpp +++ b/src/core/proteinmatch.cpp @@ -118,7 +118,7 @@ void ProteinMatch::setGroupingExperiment(GroupingExperiment * p_grp_experiment) for (auto & p_peptide_match : _peptide_match_list) { if (p_peptide_match->isValidAndChecked()) { - p_grp_experiment->setGrpPeptide(_sp_grp_protein, p_peptide_match); + p_peptide_match->setGrpPeptideSp(p_grp_experiment->setGrpPeptide(_sp_grp_protein, p_peptide_match)); } } } diff --git a/src/grouping/groupingexperiment.h b/src/grouping/groupingexperiment.h index 2c4353966be4b6a51c2c92ad5f54975ec5ebd813..e05d9e0f1aefc44c7916f2347be4ea7de98a1d3c 100644 --- a/src/grouping/groupingexperiment.h +++ b/src/grouping/groupingexperiment.h @@ -39,8 +39,8 @@ public: static GroupingExperiment * newInstance(const GroupingType & grouping_type); - virtual pappso::GrpProteinSp getGrpProteinSp(ProteinMatch* p_protein_match) = 0; - virtual void setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) = 0; + virtual pappso::GrpProteinSp & getGrpProteinSp(ProteinMatch* p_protein_match) = 0; + virtual pappso::GrpPeptideSp & setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) = 0; virtual void startGrouping()= 0; }; diff --git a/src/grouping/groupingpeptidemass.cpp b/src/grouping/groupingpeptidemass.cpp index b88da4769321b270bfb8869c2f4095e190abedae..c5d6c430d6f34b0fe4fcb141f6d02939fcb8cc7c 100644 --- a/src/grouping/groupingpeptidemass.cpp +++ b/src/grouping/groupingpeptidemass.cpp @@ -29,7 +29,7 @@ GroupingPeptideMass::GroupingPeptideMass() { _p_monitor = new pappso::GrpGroupingMonitor(); - _p_grp_experiment = new pappso::GrpExperiment(*_p_monitor); + _p_grp_experiment = new pappso::GrpExperiment(_p_monitor); } @@ -39,12 +39,12 @@ GroupingPeptideMass::~GroupingPeptideMass() delete _p_monitor; } -pappso::GrpProteinSp GroupingPeptideMass::getGrpProteinSp(ProteinMatch* p_protein_match) { +pappso::GrpProteinSp & GroupingPeptideMass::getGrpProteinSp(ProteinMatch* p_protein_match) { return _p_grp_experiment->getGrpProteinSp(p_protein_match->getProteinXtpSp().get()->getAccession(),p_protein_match->getProteinXtpSp().get()->getDescription()); } -void GroupingPeptideMass::setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) { +pappso::GrpPeptideSp & GroupingPeptideMass::setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) { - _p_grp_experiment->setGrpPeptide(proteinSp,p_peptide_match->getPeptideSp().get()->getSequence(), p_peptide_match->getPeptideSp().get()->getMass()); + return _p_grp_experiment->setGrpPeptide(proteinSp,p_peptide_match->getPeptideSp().get()->getSequence(), p_peptide_match->getPeptideSp().get()->getMass()); } void GroupingPeptideMass::startGrouping() { diff --git a/src/grouping/groupingpeptidemass.h b/src/grouping/groupingpeptidemass.h index 0738445ac36e488c22637977f6af61fa01c0f47e..f6644b57d54749ccb4c99c90388bbffbd3a85e3a 100644 --- a/src/grouping/groupingpeptidemass.h +++ b/src/grouping/groupingpeptidemass.h @@ -32,8 +32,8 @@ public: virtual ~GroupingPeptideMass(); - virtual pappso::GrpProteinSp getGrpProteinSp(ProteinMatch* p_protein_match) override; - virtual void setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) override; + virtual pappso::GrpProteinSp & getGrpProteinSp(ProteinMatch* p_protein_match) override; + virtual pappso::GrpPeptideSp & setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) override; virtual void startGrouping() override; protected : diff --git a/src/gui/peptide_list_view/peptidetablemodel.cpp b/src/gui/peptide_list_view/peptidetablemodel.cpp index f5e88e48c77b5d10e465053453f3ff3042c28b06..9fe229a9b18ea7daeea01e1d22bf0226d1007e59 100644 --- a/src/gui/peptide_list_view/peptidetablemodel.cpp +++ b/src/gui/peptide_list_view/peptidetablemodel.cpp @@ -95,7 +95,7 @@ int PeptideTableModel::rowCount(const QModelIndex &parent ) const { return 0; } int PeptideTableModel::columnCount(const QModelIndex &parent ) const { - return 6; + return 7; } QVariant PeptideTableModel::headerData(int section, Qt::Orientation orientation, int role) const { @@ -107,14 +107,16 @@ QVariant PeptideTableModel::headerData(int section, Qt::Orientation orientation, case 0: return QString("checked"); case 1: - return QString("sample"); + return QString("peptide ID"); case 2: - return QString("scan"); + return QString("sample"); case 3: - return QString("RT"); + return QString("scan"); case 4: - return QString("charge"); + return QString("RT"); case 5: + return QString("charge"); + case 6: return QString("sequence"); } } @@ -152,15 +154,18 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const { return _p_protein_match->getPeptideMatchList().at(row)->getIdentificationDataSource()->getResourceName(); } if (col == 2) { - return QVariant ((quint16) _p_protein_match->getPeptideMatchList().at(row)->getScan()); + return _p_protein_match->getPeptideMatchList().at(row)->getIdentificationDataSource()->getResourceName(); } if (col == 3) { - return QVariant ((qreal) _p_protein_match->getPeptideMatchList().at(row)->getRetentionTime()); + return QVariant ((quint16) _p_protein_match->getPeptideMatchList().at(row)->getScan()); } if (col == 4) { - return QVariant ((quint8) _p_protein_match->getPeptideMatchList().at(row)->getCharge()); + return QVariant ((qreal) _p_protein_match->getPeptideMatchList().at(row)->getRetentionTime()); } if (col == 5) { + return QVariant ((quint8) _p_protein_match->getPeptideMatchList().at(row)->getCharge()); + } + if (col ==6) { return _p_protein_match->getPeptideMatchList().at(row)->getPeptideSp().get()->getSequence(); } } diff --git a/src/gui/protein_list_view/proteintablemodel.cpp b/src/gui/protein_list_view/proteintablemodel.cpp index 16745f411eca3384ad8f8baa3714f5c8755b9029..25b28d48e3e4574f587474e45bd30c28ae63008a 100644 --- a/src/gui/protein_list_view/proteintablemodel.cpp +++ b/src/gui/protein_list_view/proteintablemodel.cpp @@ -126,7 +126,7 @@ int ProteinTableModel::rowCount(const QModelIndex &parent ) const { return 0; } int ProteinTableModel::columnCount(const QModelIndex &parent ) const { - return 4; + return 5; } QVariant ProteinTableModel::headerData(int section, Qt::Orientation orientation, int role) const {