libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
specxtractinterface.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/processing/spectree/specxtractinterface.h
3
* \date 11/12/2023
4
* \author Olivier Langella
5
* \brief Matthieu David's SpecTree structure
6
*
7
* C++ implementation of algorithm already described in :
8
* 1. David, M., Fertin, G., Rogniaux, H. & Tessier, D. SpecOMS: A Full Open
9
* Modification Search Method Performing All-to-All Spectra Comparisons within
10
* Minutes. J. Proteome Res. 16, 3030–3038 (2017).
11
*
12
* https://www.theses.fr/2019NANT4092
13
*/
14
15
16
/*
17
* SpecTree
18
* Copyright (C) 2023 Olivier Langella
19
* <olivier.langella@universite-paris-saclay.fr>
20
*
21
* This program is free software: you can redistribute ipetide to spectrum
22
* alignmentt and/or modify it under the terms of the GNU General Public License
23
* as published by the Free Software Foundation, either version 3 of the
24
* License, or (at your option) any later version.
25
*
26
* This program is distributed in the hope that it will be useful,
27
* but WITHOUT ANY WARRANTY; without even the implied warranty of
28
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
* GNU General Public License for more details.
30
*
31
* You should have received a copy of the GNU General Public License
32
* along with this program. If not, see <http://www.gnu.org/licenses/>.
33
*
34
*/
35
36
#pragma once
37
38
#include <map>
39
#include "
pappsomspp/export-import-config.h
"
40
41
namespace
pappso
42
{
43
namespace
spectree
44
{
45
46
/**
47
* @brief yield similarities between pairs of ItemCart
48
*
49
* The best thing is to implement this interface to process similarity at the
50
* time of the spectree extraction
51
*/
52
class
PMSPP_LIB_DECL
SpecXtractInterface
53
{
54
public
:
55
/**
56
* Default constructor
57
*/
58
SpecXtractInterface
();
59
60
/**
61
* Destructor
62
*/
63
virtual
~SpecXtractInterface
();
64
65
virtual
void
beginItemCartExtraction
(std::size_t cart_id_a);
66
virtual
void
reportSimilarity
(std::size_t cart_id_a,
67
std::size_t cart_id_b,
68
std::size_t similarity) = 0;
69
virtual
void
endItemCartExtraction
(std::size_t cart_id_a);
70
};
71
72
/** @brief store all similarities in vectors an map : very costly for memory and
73
* CPU
74
*
75
* only for testing purpose
76
*/
77
class
SpecXtractMap
:
public
SpecXtractInterface
78
{
79
80
public
:
81
/**
82
* Default constructor
83
*/
84
SpecXtractMap
();
85
86
/**
87
* Destructor
88
*/
89
virtual
~SpecXtractMap
();
90
91
void
reportSimilarity
(std::size_t cart_id_a,
92
std::size_t cart_id_b,
93
std::size_t similarity)
override
;
94
95
const
std::map<std::size_t, std::map<std::size_t, std::size_t>> &
96
getMapSimilarities
()
const
;
97
98
void
clear
();
99
100
private
:
101
std::map<std::size_t, std::map<std::size_t, std::size_t>>
m_mapSimilarities
;
102
};
103
104
}
// namespace spectree
105
}
// namespace pappso
pappso::spectree::SpecXtractInterface::SpecXtractInterface
SpecXtractInterface()
Definition
specxtractinterface.cpp:45
pappso::spectree::SpecXtractInterface::beginItemCartExtraction
virtual void beginItemCartExtraction(std::size_t cart_id_a)
Definition
specxtractinterface.cpp:58
pappso::spectree::SpecXtractInterface::reportSimilarity
virtual void reportSimilarity(std::size_t cart_id_a, std::size_t cart_id_b, std::size_t similarity)=0
pappso::spectree::SpecXtractInterface::endItemCartExtraction
virtual void endItemCartExtraction(std::size_t cart_id_a)
Definition
specxtractinterface.cpp:54
pappso::spectree::SpecXtractMap::~SpecXtractMap
virtual ~SpecXtractMap()
Definition
specxtractinterface.cpp:82
pappso::spectree::SpecXtractMap::reportSimilarity
void reportSimilarity(std::size_t cart_id_a, std::size_t cart_id_b, std::size_t similarity) override
Definition
specxtractinterface.cpp:63
pappso::spectree::SpecXtractMap::clear
void clear()
Definition
specxtractinterface.cpp:93
pappso::spectree::SpecXtractMap::SpecXtractMap
SpecXtractMap()
Definition
specxtractinterface.cpp:78
pappso::spectree::SpecXtractMap::m_mapSimilarities
std::map< std::size_t, std::map< std::size_t, std::size_t > > m_mapSimilarities
Definition
specxtractinterface.h:101
pappso::spectree::SpecXtractMap::getMapSimilarities
const std::map< std::size_t, std::map< std::size_t, std::size_t > > & getMapSimilarities() const
Definition
specxtractinterface.cpp:87
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso::spectree
Definition
bucket.cpp:43
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappsomspp
core
processing
spectree
specxtractinterface.h
Generated on
for libpappsomspp by
1.17.0