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

better grouping access

parent 2441b00a
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
#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")
......
......@@ -100,6 +100,6 @@ 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
const pappso::GrpPeptideSp & PeptideMatch::getGrpPeptideSp() const {
return _sp_grp_peptide;
}
......@@ -113,23 +113,20 @@ std::vector<PeptideMatch *> & ProteinMatch::getPeptideMatchList() {
}
void ProteinMatch::setGroupingExperiment(GroupingExperiment * p_grp_experiment) {
_sp_grp_protein = nullptr;
if (isValidAndChecked()) {
_sp_grp_protein = p_grp_experiment->getGrpProteinSp(this);
for (auto & p_peptide_match : _peptide_match_list) {
if (p_peptide_match->isValidAndChecked()) {
p_peptide_match->setGrpPeptideSp(p_grp_experiment->setGrpPeptide(_sp_grp_protein, p_peptide_match));
}
p_peptide_match->setGrpPeptideSp(nullptr);
if (p_peptide_match->isValidAndChecked()) {
p_peptide_match->setGrpPeptideSp(p_grp_experiment->setGrpPeptide(_sp_grp_protein, p_peptide_match));
}
}
}
}
QString ProteinMatch::getStringGroupSubgroupNumber() const {
if (_sp_grp_protein.get() != nullptr) {
if (_sp_grp_protein.get()->getGroupNumber() > 0) {
return _sp_grp_protein.get()->getGroupingId();
}
}
QString number;
return number;
const pappso::GrpProteinSp & ProteinMatch::getGrpProteinSp() const {
return _sp_grp_protein;
}
......@@ -55,7 +55,7 @@ public:
void setGroupingExperiment(GroupingExperiment * p_grp_experiment);
QString getStringGroupSubgroupNumber() const;
const pappso::GrpProteinSp & getGrpProteinSp() const;
private:
pappso::GrpProteinSp _sp_grp_protein;
......
......@@ -152,7 +152,9 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const {
return QVariant();
}
if (col == 1) {
return _p_protein_match->getPeptideMatchList().at(row)->getGrpPeptideSp().get()->getGroupingId();
pappso::GrpPeptide * p_grp_peptide = _p_protein_match->getPeptideMatchList().at(row)->getGrpPeptideSp().get();
if (p_grp_peptide != nullptr) return p_grp_peptide->getGroupingId();
return QVariant();
}
if (col == 2) {
return _p_protein_match->getPeptideMatchList().at(row)->getIdentificationDataSource()->getResourceName();
......
......@@ -23,6 +23,7 @@
#include "proteintablemodel.h"
#include "proteinlistwindow.h"
#include <pappsomspp/grouping/grpprotein.h>
#include <QDebug>
......@@ -179,7 +180,9 @@ QVariant ProteinTableModel::data(const QModelIndex &index, int role ) const {
}
if (col == 1) {
return _p_identification_group->getProteinMatchList().at(row)->getStringGroupSubgroupNumber();
pappso::GrpProtein * p_grp_prot = _p_identification_group->getProteinMatchList().at(row)->getGrpProteinSp().get();
if (p_grp_prot != nullptr) return p_grp_prot->getGroupingId();
return QVariant();
}
if (col == 2) {
......
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