From 9fe2407e01a39e735eca10cf083ee8f11716cf37 Mon Sep 17 00:00:00 2001 From: Olivier Langella <Olivier.Langella@moulon.inra.fr> Date: Wed, 22 Mar 2017 12:06:46 +0100 Subject: [PATCH] first working grouping algo --- src/CMakeLists.txt | 1 + src/core/identificationgroup.cpp | 12 + src/core/identificationgroup.h | 3 + src/core/project.cpp | 8 + src/core/project.h | 4 + src/core/proteinmatch.cpp | 23 ++ src/core/proteinmatch.h | 19 +- src/grouping/groupingexperiment.cpp | 11 + src/grouping/groupingexperiment.h | 15 +- src/grouping/groupingpeptidemass.cpp | 52 ++++ src/grouping/groupingpeptidemass.h | 47 +++ src/gui/mainwindow.cpp | 16 +- .../protein_list_view/proteinlistwindow.cpp | 3 +- src/gui/protein_list_view/proteinlistwindow.h | 2 +- .../protein_list_view/proteintablemodel.cpp | 48 ++-- src/gui/protein_list_view/proteintablemodel.h | 2 + src/resources/xtandempipeline_icon.svg | 270 +++++++++++++----- src/utils/types.h | 39 +++ 18 files changed, 465 insertions(+), 110 deletions(-) create mode 100644 src/grouping/groupingpeptidemass.cpp create mode 100644 src/grouping/groupingpeptidemass.h create mode 100644 src/utils/types.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5385f2566..6bc8c3534 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,6 +64,7 @@ SET(CPP_FILES core/identification_sources/identificationxtandemfile.cpp files/xpipfile.cpp grouping/groupingexperiment.cpp + grouping/groupingpeptidemass.cpp input/xpipsaxhandler.cpp utils/peptidestore.cpp utils/readspectrum.cpp diff --git a/src/core/identificationgroup.cpp b/src/core/identificationgroup.cpp index 7b86a9081..a6ac7bec6 100644 --- a/src/core/identificationgroup.cpp +++ b/src/core/identificationgroup.cpp @@ -77,3 +77,15 @@ size_t IdentificationGroup::countValid()const { } return i; } + +void IdentificationGroup::startGrouping (const GroupingType & grouping_type) { + if (_p_grp_experiment != nullptr) { + delete _p_grp_experiment; + } + _p_grp_experiment = GroupingExperiment::newInstance(grouping_type); + for (auto & p_protein_match : _protein_match_list) { + p_protein_match->setGroupingExperiment(_p_grp_experiment); + } + + _p_grp_experiment->startGrouping(); +} diff --git a/src/core/identificationgroup.h b/src/core/identificationgroup.h index 75337244b..961d0f71b 100644 --- a/src/core/identificationgroup.h +++ b/src/core/identificationgroup.h @@ -26,6 +26,7 @@ #include <pappsomspp/msrun/msrunid.h> #include "grouping/groupingexperiment.h" +#include "../utils/types.h" #ifndef IDENTIFICATIONGROUP_H #define IDENTIFICATIONGROUP_H @@ -54,6 +55,8 @@ public: /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks * */ void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters); + + void startGrouping (const GroupingType & grouping_type); private : GroupingExperiment * _p_grp_experiment= nullptr; diff --git a/src/core/project.cpp b/src/core/project.cpp index 3e6a0955d..f4a69901d 100644 --- a/src/core/project.cpp +++ b/src/core/project.cpp @@ -88,3 +88,11 @@ void Project::readXpipFile(QFileInfo xpip_fileinfo) { IdentificationGroup* Project::getCurrentIdentificationGroupP() const { return _p_current_identification_group; } + + +void Project::startGrouping() { + for (auto & p_id_group : _identification_goup_list) { + p_id_group->startGrouping(_grouping_type); + } + +} diff --git a/src/core/project.h b/src/core/project.h index b5ddcdf6a..5992dbf88 100644 --- a/src/core/project.h +++ b/src/core/project.h @@ -26,6 +26,7 @@ #include<memory> #include "identificationgroup.h" #include "automaticfilterparameters.h" +#include "utils/types.h" class Project; typedef std::shared_ptr<Project> ProjectSp; @@ -47,6 +48,7 @@ public: /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks * */ void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters); + void startGrouping(); private : @@ -54,6 +56,8 @@ private : IdentificationGroup* _p_current_identification_group = nullptr; AutomaticFilterParameters _automatic_filter_parameters; + + GroupingType _grouping_type = GroupingType::PeptideMass; }; #endif // PROJECT_H diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp index 05432afa2..31181bb78 100644 --- a/src/core/proteinmatch.cpp +++ b/src/core/proteinmatch.cpp @@ -23,6 +23,7 @@ #include "proteinmatch.h" #include <pappsomspp/msrun/msrunid.h> +#include <pappsomspp/grouping/grpprotein.h> ProteinMatch::ProteinMatch() @@ -110,3 +111,25 @@ void ProteinMatch::addPeptideMatch(PeptideMatch * peptide_match) { std::vector<PeptideMatch *> & ProteinMatch::getPeptideMatchList() { return _peptide_match_list; } + +void ProteinMatch::setGroupingExperiment(GroupingExperiment * p_grp_experiment) { + if (isValidAndChecked()) { + _sp_grp_protein = p_grp_experiment->getGrpProteinSp(this); + + for (auto & p_peptide_match : _peptide_match_list) { + if (p_peptide_match->isValidAndChecked()) { + 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; +} diff --git a/src/core/proteinmatch.h b/src/core/proteinmatch.h index 298355014..d6500acf6 100644 --- a/src/core/proteinmatch.h +++ b/src/core/proteinmatch.h @@ -26,6 +26,7 @@ #include "proteinxtp.h" #include "peptidematch.h" #include "automaticfilterparameters.h" +#include "../grouping/groupingexperiment.h" #ifndef PROTEINMATCH_H #define PROTEINMATCH_H @@ -35,7 +36,7 @@ class ProteinMatch public: ProteinMatch(); ~ProteinMatch(); - + const ProteinXtpSp & getProteinXtpSp() const; void setEvalue(pappso::pappso_double evalue); pappso::pappso_double getEvalue() const; @@ -43,23 +44,29 @@ public: void addPeptideMatch(PeptideMatch * peptide_match); std::vector<PeptideMatch *> & getPeptideMatchList(); void setChecked(bool arg1); - + bool isChecked() const; bool isValid() const; bool isValidAndChecked() const; - - /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks - * */ + + /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks + * */ void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters); + void setGroupingExperiment(GroupingExperiment * p_grp_experiment); + + QString getStringGroupSubgroupNumber() const; + private: + pappso::GrpProteinSp _sp_grp_protein; + std::vector<PeptideMatch *> _peptide_match_list; ProteinXtpSp _protein_sp = nullptr; pappso::pappso_double _evalue=0; /** @brief manually checked by user (true by default) */ bool _checked = true; - + /** @brief automatic filter result (false by default) */ bool _proxy_valid = false; diff --git a/src/grouping/groupingexperiment.cpp b/src/grouping/groupingexperiment.cpp index 717e7580f..8183207f7 100644 --- a/src/grouping/groupingexperiment.cpp +++ b/src/grouping/groupingexperiment.cpp @@ -22,6 +22,8 @@ ******************************************************************************/ #include "groupingexperiment.h" +#include <pappsomspp/exception/exceptionnotimplemented.h> +#include "groupingpeptidemass.h" GroupingExperiment::GroupingExperiment() { @@ -32,3 +34,12 @@ GroupingExperiment::~GroupingExperiment() { } + +GroupingExperiment * GroupingExperiment::newInstance(const GroupingType & grouping_type) { + if (grouping_type == GroupingType::PeptideMass) { + return new GroupingPeptideMass(); + } + else { + throw pappso::ExceptionNotImplemented(QObject::tr("Grouping algorithm not yet implemented")); + } +} diff --git a/src/grouping/groupingexperiment.h b/src/grouping/groupingexperiment.h index f473f2c6b..2c4353966 100644 --- a/src/grouping/groupingexperiment.h +++ b/src/grouping/groupingexperiment.h @@ -22,16 +22,27 @@ ******************************************************************************/ +#include "../utils/types.h" +#include <pappsomspp/grouping/grpexperiment.h> + #ifndef GROUPINGEXPERIMENT_H #define GROUPINGEXPERIMENT_H +class ProteinMatch; +class PeptideMatch; + class GroupingExperiment { public: GroupingExperiment(); ~GroupingExperiment(); - - + + 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 void startGrouping()= 0; + }; #endif // GROUPINGEXPERIMENT_H diff --git a/src/grouping/groupingpeptidemass.cpp b/src/grouping/groupingpeptidemass.cpp new file mode 100644 index 000000000..b88da4769 --- /dev/null +++ b/src/grouping/groupingpeptidemass.cpp @@ -0,0 +1,52 @@ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>. +* +* This file is part of XTPcpp. +* +* XTPcpp is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* XTPcpp is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>. +* +* Contributors: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ + +#include "groupingpeptidemass.h" +#include "../core/proteinmatch.h" +#include "../core/peptidematch.h" + +GroupingPeptideMass::GroupingPeptideMass() +{ + + _p_monitor = new pappso::GrpGroupingMonitor(); + _p_grp_experiment = new pappso::GrpExperiment(*_p_monitor); + +} + +GroupingPeptideMass::~GroupingPeptideMass() +{ + delete _p_grp_experiment; + delete _p_monitor; +} + +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) { + + _p_grp_experiment->setGrpPeptide(proteinSp,p_peptide_match->getPeptideSp().get()->getSequence(), p_peptide_match->getPeptideSp().get()->getMass()); +} + +void GroupingPeptideMass::startGrouping() { + _p_grp_experiment->startGrouping(); +} diff --git a/src/grouping/groupingpeptidemass.h b/src/grouping/groupingpeptidemass.h new file mode 100644 index 000000000..0738445ac --- /dev/null +++ b/src/grouping/groupingpeptidemass.h @@ -0,0 +1,47 @@ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>. +* +* This file is part of XTPcpp. +* +* XTPcpp is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* XTPcpp is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>. +* +* Contributors: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ +#include "groupingexperiment.h" + +#ifndef GROUPINGPEPTIDEMASS_H +#define GROUPINGPEPTIDEMASS_H + +class GroupingPeptideMass: public GroupingExperiment +{ + friend class GroupingExperiment; +public: + + virtual ~GroupingPeptideMass(); + + virtual pappso::GrpProteinSp getGrpProteinSp(ProteinMatch* p_protein_match) override; + virtual void setGrpPeptide(pappso::GrpProteinSp proteinSp, PeptideMatch* p_peptide_match) override; + virtual void startGrouping() override; + +protected : + GroupingPeptideMass(); + +private : + pappso::GrpGroupingMonitor * _p_monitor; + pappso::GrpExperiment * _p_grp_experiment; +}; + +#endif // GROUPINGPEPTIDEMASS_H diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 139afaeb1..cf31011b2 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -50,11 +50,11 @@ MainWindow::MainWindow(QWidget *parent): */ workerThread.start(); - QDockWidget *dock = new QDockWidget(tr("Protein List"), this); + //QDockWidget *dock = new QDockWidget(tr("Protein List"), this); _protein_list_window = new ProteinListWindow(this); - //_protein_list_window->show(); - dock->setWidget(_protein_list_window); - addDockWidget(Qt::RightDockWidgetArea, dock); + _protein_list_window->show(); + //dock->setWidget(_protein_list_window); + //addDockWidget(Qt::RightDockWidgetArea, dock); #if QT_VERSION >= 0x050000 @@ -128,7 +128,13 @@ void MainWindow::selectXpipFile() { _protein_list_window->setIdentificationGroup(_project_sp.get()->getCurrentIdentificationGroupP()); } catch (pappso::PappsoException & error) { - viewError(error.qwhat()); + viewError(tr("Error while reading XPIP file :\n%1").arg(error.qwhat())); + } + try { + _project_sp.get()->startGrouping(); + } + catch (pappso::PappsoException & error) { + viewError(tr("Error while grouping :\n%1").arg(error.qwhat())); } } diff --git a/src/gui/protein_list_view/proteinlistwindow.cpp b/src/gui/protein_list_view/proteinlistwindow.cpp index 60248bf10..bf1e2492b 100644 --- a/src/gui/protein_list_view/proteinlistwindow.cpp +++ b/src/gui/protein_list_view/proteinlistwindow.cpp @@ -57,13 +57,14 @@ ProteinListWindow::ProteinListWindow(MainWindow *parent): #else // Qt4 code connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableClicked(const QModelIndex &))); + connect(ui->tableView, SIGNAL(doubleClicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableDoubleClicked(const QModelIndex &))); connect(ui->proteinSearchEdit, SIGNAL(textChanged(QString)), _protein_table_model_p, SLOT(onProteinSearchEdit(QString))); //connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, SLOT(updateStatusBar())); #endif } -void ProteinListWindow::clickOnproteinMatch(ProteinMatch * p_protein_match) { +void ProteinListWindow::doubleclickOnproteinMatch(ProteinMatch * p_protein_match) { emit proteinMatchClicked(p_protein_match); //updateStatusBar(); } diff --git a/src/gui/protein_list_view/proteinlistwindow.h b/src/gui/protein_list_view/proteinlistwindow.h index dea9dd09c..b4c960dec 100644 --- a/src/gui/protein_list_view/proteinlistwindow.h +++ b/src/gui/protein_list_view/proteinlistwindow.h @@ -43,7 +43,7 @@ public: explicit ProteinListWindow(MainWindow * parent = 0); ~ProteinListWindow(); void setIdentificationGroup(IdentificationGroup * p_identification_group); - void clickOnproteinMatch(ProteinMatch * p_protein_match); + void doubleclickOnproteinMatch(ProteinMatch * p_protein_match); void updateStatusBar(); public slots: diff --git a/src/gui/protein_list_view/proteintablemodel.cpp b/src/gui/protein_list_view/proteintablemodel.cpp index 17c8a1c96..16745f411 100644 --- a/src/gui/protein_list_view/proteintablemodel.cpp +++ b/src/gui/protein_list_view/proteintablemodel.cpp @@ -45,6 +45,12 @@ void ProteinTableProxyModel::onTableClicked(const QModelIndex &index) _protein_table_model_p->onTableClicked(this->mapToSource(index)); } +void ProteinTableProxyModel::onTableDoubleClicked(const QModelIndex &index) +{ + qDebug() << "ProteinTableProxyModel::onTableDoubleClicked begin " << index.row(); + qDebug() << "ProteinTableProxyModel::onTableDoubleClicked begin " << this->mapToSource(index).row(); + _protein_table_model_p->onTableDoubleClicked(this->mapToSource(index)); +} bool ProteinTableProxyModel::lessThan(const QModelIndex & left, const QModelIndex & right) const { QVariant leftData = sourceModel()->data(left); QVariant rightData = sourceModel()->data(right); @@ -132,10 +138,12 @@ QVariant ProteinTableModel::headerData(int section, Qt::Orientation orientation, case 0: return QString("checked"); case 1: - return QString("accession"); + return QString("group"); case 2: - return QString("protein description"); + return QString("accession"); case 3: + return QString("protein description"); + case 4: return QString("Evalue"); } } @@ -163,31 +171,32 @@ QVariant ProteinTableModel::data(const QModelIndex &index, int role ) const { } break; case Qt::DisplayRole: + if (_p_identification_group == nullptr) { + return QVariant(); + } if (col == 0) { return QVariant(); } + if (col == 1) { - if (_p_identification_group != nullptr) { - return _p_identification_group->getProteinMatchList().at(row)->getProteinXtpSp().get()->getAccession(); - } + return _p_identification_group->getProteinMatchList().at(row)->getStringGroupSubgroupNumber(); } + if (col == 2) { - if (_p_identification_group != nullptr) { - return _p_identification_group->getProteinMatchList().at(row)->getProteinXtpSp().get()->getDescription(); - } + return _p_identification_group->getProteinMatchList().at(row)->getProteinXtpSp().get()->getAccession(); + } if (col == 3) { - if (_p_identification_group != nullptr) { + return _p_identification_group->getProteinMatchList().at(row)->getProteinXtpSp().get()->getDescription(); - return QVariant ((qreal)_p_identification_group->getProteinMatchList().at(row)->getEvalue()); - } } - if (col == 4) { - if (_p_identification_group != nullptr) { + return QVariant ((qreal)_p_identification_group->getProteinMatchList().at(row)->getEvalue()); - return QVariant ((quint16) _p_identification_group->getProteinMatchList().at(row)->getPeptideMatchList().size()); - } + } + + if (col == 5) { + return QVariant ((quint16) _p_identification_group->getProteinMatchList().at(row)->getPeptideMatchList().size()); } return QString("Row%1, Column%2") @@ -212,10 +221,13 @@ void ProteinTableModel::onTableClicked(const QModelIndex &index) //emit dataChanged(index, index); _p_protein_list_window->updateStatusBar(); } +} - else { - _p_protein_list_window->clickOnproteinMatch(_p_identification_group->getProteinMatchList().at(row)); - } +void ProteinTableModel::onTableDoubleClicked(const QModelIndex &index) +{ + int row = index.row(); + int col = index.column(); + _p_protein_list_window->doubleclickOnproteinMatch(_p_identification_group->getProteinMatchList().at(row)); } bool ProteinTableModel::acceptRow(int source_row) { diff --git a/src/gui/protein_list_view/proteintablemodel.h b/src/gui/protein_list_view/proteintablemodel.h index 715be5986..53f642e95 100644 --- a/src/gui/protein_list_view/proteintablemodel.h +++ b/src/gui/protein_list_view/proteintablemodel.h @@ -44,6 +44,7 @@ public: public slots: void onTableClicked(const QModelIndex &index); + void onTableDoubleClicked(const QModelIndex &index); private: double m_minGravity; double m_minDensity; @@ -66,6 +67,7 @@ public: public slots: void onTableClicked(const QModelIndex &index); + void onTableDoubleClicked(const QModelIndex &index); void onProteinSearchEdit(QString protein_search_string); private : IdentificationGroup * _p_identification_group = nullptr; diff --git a/src/resources/xtandempipeline_icon.svg b/src/resources/xtandempipeline_icon.svg index 0ba818fef..32c7eef0f 100644 --- a/src/resources/xtandempipeline_icon.svg +++ b/src/resources/xtandempipeline_icon.svg @@ -7,19 +7,32 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="60" height="60" id="svg2" version="1.1" - inkscape:version="0.48.0 r9654" - sodipodi:docname="logo.svg" + inkscape:version="0.48.5 r10040" + sodipodi:docname="xtandempipeline_icon.svg" inkscape:export-filename="/home/valot/developpement/eclipse_java/MSMS_Xtandem/src/resources/images/icon_64.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96"> <defs id="defs4"> + <linearGradient + inkscape:collect="always" + id="linearGradient3810"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop3812" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop3814" /> + </linearGradient> <filter color-interpolation-filters="sRGB" inkscape:collect="always" @@ -38,6 +51,123 @@ stdDeviation="0.70158516" id="feGaussianBlur3951-6" /> </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3816" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3818" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3820" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3822" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3824" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3826" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3883" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3886" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3888" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3891" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3893" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3895" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3810" + id="linearGradient3897" + gradientUnits="userSpaceOnUse" + x1="474.67546" + y1="605.45889" + x2="519.62037" + y2="605.45889" /> </defs> <sodipodi:namedview id="base" @@ -58,8 +188,8 @@ fit-margin-bottom="2" inkscape:window-width="988" inkscape:window-height="747" - inkscape:window-x="1280" - inkscape:window-y="0" + inkscape:window-x="2416" + inkscape:window-y="72" inkscape:window-maximized="0" /> <metadata id="metadata7"> @@ -69,7 +199,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -78,89 +208,75 @@ inkscape:groupmode="layer" id="layer1" transform="translate(-469.60713,-573.38113)"> + <path + sodipodi:nodetypes="ccacczczccaccsc" + inkscape:connector-curvature="0" + id="path4737-0-3" + d="m 470.89169,596.6026 9.24838,-6.50904 c 0,0 0.5666,-0.13789 0.86031,-0.11255 0.28997,0.0251 0.68826,0.24386 0.68826,0.24386 l 1.89269,2.30723 c 0,0 13.3782,-0.35891 18.98375,0.77215 5.60552,1.13108 16.96521,7.23434 16.96521,7.23434 0,0 -10.82771,-3.87759 -16.37184,-4.66141 -5.54414,-0.78383 -15.79174,0.8192 -15.79174,0.8192 l 2.23682,2.38226 c 0,0 -0.0476,0.27224 -0.25809,0.35641 -0.19494,0.0779 -0.77429,0.0751 -0.77429,0.0751 l -17.29231,-2.1009 c 0,0 -0.4263,-0.20818 -0.51619,-0.33764 -0.0914,-0.13167 0.12904,-0.46896 0.12904,-0.46896 z" + style="fill:#2f355b;fill-opacity:1;stroke:none" /> + <path + style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3949-8)" + d="M 76.193139,13.401715 C 57.710046,8.3130962 21.120369,-2.1218122 21.120369,-2.1218122 c -0.643749,1.38451197 7.683582,19.5802352 7.683582,19.5802352 0,0 -23.8152872,7.996468 -37.3644885,10.578805 C -22.109739,30.619566 -67.20969,-6.5991839 -67.20969,-6.5991839" + id="path3943" + inkscape:connector-curvature="0" + sodipodi:nodetypes="czczc" + transform="matrix(-0.33085924,0,0,-0.14427887,496.45457,599.15091)" /> <g - id="g4543" - transform="translate(-0.21527325,0.494395)"> - <path - style="fill:#2f355b;fill-opacity:1;stroke:none" - d="m 471.10696,596.1082 9.24838,-6.50903 c 0,0 0.5666,-0.1379 0.86031,-0.11255 0.28997,0.0251 0.68826,0.24386 0.68826,0.24386 l 1.89269,2.30723 c 0,0 13.3782,-0.35891 18.98375,0.77215 5.60552,1.13107 16.96521,7.23434 16.96521,7.23434 0,0 -10.82771,-3.87759 -16.37184,-4.66141 -5.54414,-0.78383 -15.79174,0.8192 -15.79174,0.8192 l 2.23682,2.38226 c 0,0 -0.0476,0.27224 -0.25809,0.35641 -0.19494,0.0779 -0.77429,0.0751 -0.77429,0.0751 l -17.29231,-2.1009 c 0,0 -0.4263,-0.20818 -0.51619,-0.33764 -0.0914,-0.13167 0.12904,-0.46896 0.12904,-0.46896 z" - id="path4737-0-3" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccacczczccaccsc" /> - <path - transform="matrix(-0.33085924,0,0,-0.14427887,496.66984,598.65651)" - sodipodi:nodetypes="czczc" - inkscape:connector-curvature="0" - id="path3943" - d="M 76.193139,13.401715 C 57.710046,8.3130962 21.120369,-2.1218122 21.120369,-2.1218122 c -0.643749,1.38451197 7.683582,19.5802352 7.683582,19.5802352 0,0 -23.8152872,7.996468 -37.3644885,10.578805 C -22.109739,30.619566 -67.20969,-6.5991839 -67.20969,-6.5991839" - style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3949-8)" /> + id="g3804" + style="fill:url(#linearGradient3897);fill-opacity:1;stroke:none" + transform="translate(-0.75,-1.75)"> <path - inkscape:connector-curvature="0" + style="fill:url(#linearGradient3886);fill-opacity:1;stroke:none" + d="m 481.18242,581.35399 c 4.91751,-0.0366 9.83503,-0.0731 14.75254,-0.10971 7.56627,16.14307 15.13253,32.28615 22.6988,48.42922 -4.91623,0 -9.83245,0 -14.74868,0 -7.56755,-16.1065 -15.13511,-32.21301 -22.70266,-48.31951 z" id="path3774" - d="m 481.39769,580.85959 14.75254,-0.10971 22.6988,48.42922 -14.74868,0 z" - style="fill:#dd6622;fill-opacity:1;stroke:#faf7f7;stroke-width:0.29213133;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - sodipodi:nodetypes="ccccc" /> + inkscape:connector-curvature="0" /> <g - transform="matrix(1.0768952,0,0,1.0859,-38.58903,-55.894743)" - id="g3882"> + transform="matrix(1.0768952,0,0,1.0859,-38.804303,-55.400348)" + id="g3885" + style="fill:url(#linearGradient3895);fill-opacity:1;stroke:none"> <g - id="g3885"> - <g - id="g3888"> - <path - style="fill:#dd6622;fill-opacity:1;stroke:#ffffff;stroke-width:0.2701447;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" - d="m 476.95062,630.87097 15.70961,0 25.75475,-44.54265 -12.00402,0 z" - id="path3794" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccccc" /> - </g> + id="g3888" + style="fill:url(#linearGradient3893);fill-opacity:1;stroke:none"> + <path + style="fill:url(#linearGradient3891);fill-opacity:1;stroke:none" + d="m 476.95062,630.87097 c 5.23654,0 10.47307,0 15.70961,0 8.58492,-14.84755 17.16983,-29.6951 25.75475,-44.54265 -4.00134,0 -8.00268,0 -12.00402,0 -9.82011,14.84755 -19.64023,29.6951 -29.46034,44.54265 z" + id="path3794" + inkscape:connector-curvature="0" /> </g> </g> + </g> + <path + sodipodi:type="arc" + style="fill:#ffffff;fill-opacity:1;stroke:none" + id="path3000" + sodipodi:cx="457.72537" + sodipodi:cy="595.52069" + sodipodi:rx="17.551399" + sodipodi:ry="17.425131" + d="m 475.27677,595.52069 a 17.551399,17.425131 0 1 1 -35.1028,0 17.551399,17.425131 0 1 1 35.1028,0 z" + transform="matrix(0.28240083,0,-0.10341225,0.34807759,440.51776,415.61624)" /> + <path + style="fill:#dd6622;fill-opacity:1;stroke:#f8f8f8;stroke-width:0.29213133;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 515.79849,577.08877 12.69069,0.0236 -17.17225,38.31008 z" + id="path3796" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + <g + id="g4523" + transform="matrix(0.98860354,-0.15054248,0.25363017,1.6655743,-148.76218,-328.80464)"> <path - transform="matrix(0.28240083,0,-0.10341225,0.34807759,440.73303,415.12185)" - d="m 475.27677,595.52069 c 0,9.62363 -7.85803,17.42513 -17.5514,17.42513 -9.69337,0 -17.5514,-7.8015 -17.5514,-17.42513 0,-9.62363 7.85803,-17.42513 17.5514,-17.42513 9.69337,0 17.5514,7.8015 17.5514,17.42513 z" - sodipodi:ry="17.425131" - sodipodi:rx="17.551399" - sodipodi:cy="595.52069" - sodipodi:cx="457.72537" - id="path3000" - style="fill:#ffffff;fill-opacity:1;stroke:none" - sodipodi:type="arc" /> - <path - sodipodi:nodetypes="cccc" - inkscape:connector-curvature="0" - id="path3796" - d="m 516.01376,576.59437 12.69069,0.0236 -17.17225,38.31008 z" - style="fill:#dd6622;fill-opacity:1;stroke:#f8f8f8;stroke-width:0.29213133;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> - <path - sodipodi:nodetypes="cc" + style="fill:#2f355b;fill-opacity:1;stroke:none" + d="m 527.54746,607.30035 -10.44414,7.92336 c 0,0 -0.63987,0.16786 -0.97154,0.13701 -0.32749,-0.0305 -0.77726,-0.29684 -0.77726,-0.29684 l -2.1374,-2.80857 c 0,0 -15.10793,0.43689 -21.43825,-0.93993 -6.33032,-1.37685 -19.15873,-8.80627 -19.15873,-8.80627 0,0 12.22768,4.72014 18.48863,5.67427 6.26097,0.95415 17.83354,-0.9972 17.83354,-0.9972 l -2.52603,-2.89989 c 0,0 0.0536,-0.33139 0.29146,-0.43385 0.22014,-0.0948 0.87441,-0.0914 0.87441,-0.0914 l 19.52812,2.5574 c 0,0 0.48142,0.25341 0.58293,0.41101 0.10324,0.16026 -0.14574,0.57085 -0.14574,0.57085 z" + id="path4737-0" inkscape:connector-curvature="0" - id="path4479-1" - d="m 506.30223,603.82909 -7.45931,13.08148" - style="fill:none;stroke:#dd6622;stroke-width:0.97377104px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" /> - <g - transform="matrix(0.98860354,-0.15054248,0.25363017,1.6655743,-148.54691,-329.29904)" - id="g4523"> - <path - sodipodi:nodetypes="ccacczczccaccsc" - inkscape:connector-curvature="0" - id="path4737-0" - d="m 527.54746,607.30035 -10.44414,7.92336 c 0,0 -0.63987,0.16786 -0.97154,0.13701 -0.32749,-0.0305 -0.77726,-0.29684 -0.77726,-0.29684 l -2.1374,-2.80857 c 0,0 -15.10793,0.43689 -21.43825,-0.93993 -6.33032,-1.37685 -19.15873,-8.80627 -19.15873,-8.80627 0,0 12.22768,4.72014 18.48863,5.67427 6.26097,0.95415 17.83354,-0.9972 17.83354,-0.9972 l -2.52603,-2.89989 c 0,0 0.0536,-0.33139 0.29146,-0.43385 0.22014,-0.0948 0.87441,-0.0914 0.87441,-0.0914 l 19.52812,2.5574 c 0,0 0.48142,0.25341 0.58293,0.41101 0.10324,0.16026 -0.14574,0.57085 -0.14574,0.57085 z" - style="fill:#2f355b;fill-opacity:1;stroke:none" /> - <path - style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3939-6)" - d="m -52.507031,2.8529714 c 0,0 28.883938,35.7931886 45.6652642,41.8824406 16.7813262,6.089252 48.5303798,3.294937 48.5303798,3.294937 0,0 4.334516,16.398182 7.17743,16.43717 2.842914,0.03899 26.037556,-40.964888 26.037556,-40.964888" - id="path3149" - inkscape:connector-curvature="0" - sodipodi:nodetypes="czczc" - transform="matrix(0.41898422,0,0,0.19694403,495.91079,602.62542)" /> - </g> + sodipodi:nodetypes="ccacczczccaccsc" /> <path - sodipodi:nodetypes="cc" + transform="matrix(0.41898422,0,0,0.19694403,495.91079,602.62542)" + sodipodi:nodetypes="czczc" inkscape:connector-curvature="0" - id="path4479" - d="m 500.26774,590.57084 -7.87837,12.55114" - style="fill:none;stroke:#dd6622;stroke-width:0.97377104px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" /> + id="path3149" + d="m -52.507031,2.8529714 c 0,0 28.883938,35.7931886 45.6652642,41.8824406 16.7813262,6.089252 48.5303798,3.294937 48.5303798,3.294937 0,0 4.334516,16.398182 7.17743,16.43717 2.842914,0.03899 26.037556,-40.964888 26.037556,-40.964888" + style="fill:none;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3939-6)" /> </g> </g> </svg> diff --git a/src/utils/types.h b/src/utils/types.h new file mode 100644 index 000000000..bc7c3b7f7 --- /dev/null +++ b/src/utils/types.h @@ -0,0 +1,39 @@ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>. +* +* This file is part of XTPcpp. +* +* XTPcpp is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* XTPcpp is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>. +* +* Contributors: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ + + +#ifndef _TYPES_H_ +#define _TYPES_H_ 1 + +/*********** enumerations *********************************/ + +/** \def GroupingType list of available grouping algoritms + * + */ +enum class GroupingType { + PeptideMass, ///< protein grouper algo + Phospho, ///< phospho peptides grouping + SampleScan ///< X!TandemPipeline algo +}; + +#endif /* _TYPES_H_ */ -- GitLab