libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
specxtractinterface.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/spectree/specxtractinterface.cpp
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#include "specxtractinterface.h"
37#include <QDebug>
38
39
40namespace pappso
41{
42namespace spectree
43{
44
48
52
53void
55{
56}
57void
59{
60}
61
62void
63SpecXtractMap::reportSimilarity(std::size_t cart_id_a,
64 std::size_t cart_id_b,
65 std::size_t similarity)
66{
67 qDebug() << " a=" << cart_id_a << " b=" << cart_id_b
68 << " count=" << similarity;
69 auto it_line =
70 m_mapSimilarities.insert({cart_id_a, std::map<std::size_t, std::size_t>()});
71
72 auto it_line2 = it_line.first->second.insert({cart_id_b, similarity});
73
74 if(it_line2.second == false)
75 {
76 it_line2.first->second = similarity;
77 }
78}
79
83
87
88const std::map<std::size_t, std::map<std::size_t, std::size_t>> &
93
94void
99
100} // namespace spectree
101} // namespace pappso
virtual void beginItemCartExtraction(std::size_t cart_id_a)
virtual void endItemCartExtraction(std::size_t cart_id_a)
void reportSimilarity(std::size_t cart_id_a, std::size_t cart_id_b, std::size_t similarity) override
std::map< std::size_t, std::map< std::size_t, std::size_t > > m_mapSimilarities
const std::map< std::size_t, std::map< std::size_t, std::size_t > > & getMapSimilarities() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
Matthieu David's SpecTree structure.