From ff39eb29b77efb31b8ae7d1d4d42cddbf6151213 Mon Sep 17 00:00:00 2001 From: Olivier Langella <Olivier.Langella@moulon.inra.fr> Date: Mon, 29 May 2017 16:30:05 +0200 Subject: [PATCH] new ptm island group object --- src/CMakeLists.txt | 1 + src/grouping/ptm/ptmgroupingexperiment.cpp | 3 ++ src/grouping/ptm/ptmgroupingexperiment.h | 3 ++ src/grouping/ptm/ptmislandgroup.cpp | 45 +++++++++++++++++++ src/grouping/ptm/ptmislandgroup.h | 50 ++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 src/grouping/ptm/ptmislandgroup.cpp create mode 100644 src/grouping/ptm/ptmislandgroup.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 34d6ea67..59eeff83 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,7 @@ SET(CPP_FILES grouping/groupingpeptidemass.cpp grouping/ptm/ptmgroupingexperiment.cpp grouping/ptm/ptmisland.cpp + grouping/ptm/ptmislandgroup.cpp grouping/ptm/ptmislandsubgroup.cpp gui/peptide_detail_view/spectrum_widget/spectrumpainter.cpp input/xpipsaxhandler.cpp diff --git a/src/grouping/ptm/ptmgroupingexperiment.cpp b/src/grouping/ptm/ptmgroupingexperiment.cpp index 17654749..3810beec 100644 --- a/src/grouping/ptm/ptmgroupingexperiment.cpp +++ b/src/grouping/ptm/ptmgroupingexperiment.cpp @@ -72,6 +72,8 @@ PtmGroupingExperiment::~PtmGroupingExperiment() } +void PtmGroupingExperiment::startGrouping() { +} void PtmGroupingExperiment::addPtmIsland(PtmIslandSp ptm_island_sp) { if (std::none_of(_ptm_island_subgroup_list.begin(), _ptm_island_subgroup_list.end(), [ptm_island_sp](PtmIslandSubgroupSp element) { return element.get()->mergePtmIslandSp(ptm_island_sp); @@ -134,3 +136,4 @@ std::vector<unsigned int> PtmGroupingExperiment::getPtmPositions(const ProteinMa position_list.erase(last, position_list.end()); return position_list; } + diff --git a/src/grouping/ptm/ptmgroupingexperiment.h b/src/grouping/ptm/ptmgroupingexperiment.h index d34fad8e..3ae765f9 100644 --- a/src/grouping/ptm/ptmgroupingexperiment.h +++ b/src/grouping/ptm/ptmgroupingexperiment.h @@ -34,6 +34,7 @@ #include <pappsomspp/amino_acid/aamodification.h> #include "ptmisland.h" #include "ptmislandsubgroup.h" +#include "ptmislandgroup.h" class PtmGroupingExperiment { @@ -42,6 +43,7 @@ public: ~PtmGroupingExperiment(); void addProteinMatch(const ProteinMatch* p_protein_match); + void startGrouping(); private: std::vector<unsigned int> getPtmPositions(const ProteinMatch * protein_match) const; @@ -52,6 +54,7 @@ private: std::list<pappso::AaModificationP> _modification_list; ValidationState _peptide_validation_state = ValidationState::validAndChecked; std::vector<PtmIslandSubgroupSp> _ptm_island_subgroup_list; + std::vector<PtmIslandGroupSp> _ptm_island_group_list; }; #endif // PTMGROUPINGEXPERIMENT_H diff --git a/src/grouping/ptm/ptmislandgroup.cpp b/src/grouping/ptm/ptmislandgroup.cpp new file mode 100644 index 00000000..d2006630 --- /dev/null +++ b/src/grouping/ptm/ptmislandgroup.cpp @@ -0,0 +1,45 @@ +/** + * \file grouping/ptm/ptmislandgroup.cpp + * \date 29/5/2017 + * \author Olivier Langella + * \brief object to group subgroups of ptmislands sharing at least one protein + */ + +/******************************************************************************* +* 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 "ptmislandgroup.h" + +PtmIslandGroup::PtmIslandGroup() +{ + +} + +PtmIslandGroup::PtmIslandGroup(const PtmIslandGroup& other) +{ + +} + +PtmIslandGroup::~PtmIslandGroup() +{ + +} diff --git a/src/grouping/ptm/ptmislandgroup.h b/src/grouping/ptm/ptmislandgroup.h new file mode 100644 index 00000000..106c9ac7 --- /dev/null +++ b/src/grouping/ptm/ptmislandgroup.h @@ -0,0 +1,50 @@ +/** + * \file grouping/ptm/ptmislandgroup.h + * \date 29/5/2017 + * \author Olivier Langella + * \brief object to group subgroups of ptmislands sharing at least one protein + */ + +/******************************************************************************* +* 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 PTMISLANDGROUP_H +#define PTMISLANDGROUP_H + +#include <memory> + +class PtmIslandGroup; + +/** \brief shared pointer on a Peptide object + */ +typedef std::shared_ptr<PtmIslandGroup> PtmIslandGroupSp; + + +class PtmIslandGroup +{ +public: + PtmIslandGroup(); + PtmIslandGroup(const PtmIslandGroup& other); + ~PtmIslandGroup(); +}; + +#endif // PTMISLANDGROUP_H -- GitLab