libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
psmproteinmap.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/processing/cbor/psm/psmproteinmap.h
3
* \date 05/07/2025
4
* \author Olivier Langella
5
* \brief PAPPSO CBOR protein map
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
10
*
11
* This file is part of PAPPSOms-tools.
12
*
13
* PAPPSOms-tools is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms-tools is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
25
*
26
******************************************************************************/
27
#pragma once
28
29
#include <map>
30
#include <QString>
31
#include "
../../../protein/protein.h
"
32
#include "
../cborstreamwriter.h
"
33
#include "
../cborstreamreader.h
"
34
35
36
namespace
pappso::cbor::psm
37
{
38
39
struct
PsmProtein
40
{
41
std::shared_ptr<Protein>
protein_sp
=
nullptr
;
42
bool
isTarget
=
true
;
43
bool
isContaminant
=
false
;
44
QCborMap
cborEval
;
45
};
46
/**
47
* @todo write docs
48
*/
49
class
PsmProteinMap
50
{
51
public
:
52
/**
53
* Default constructor
54
*/
55
PsmProteinMap
();
56
57
/**
58
* Destructor
59
*/
60
virtual
~PsmProteinMap
();
61
62
std::pair<std::map<QString, pappso::cbor::psm::PsmProtein>::iterator,
bool
>
63
insert
(
const
PsmProtein
&psm_protein);
64
65
void
writeMap
(
CborStreamWriter
&writer)
const
;
66
67
void
readMap
(
CborStreamReader
&reader);
68
69
std::size_t
size
()
const
;
70
71
const
pappso::cbor::psm::PsmProtein
&
getByAccession
(
const
QString &accession)
const
;
72
73
private
:
74
std::map<QString, PsmProtein>
m_proteinMap
;
75
};
76
}
// namespace pappso::cbor::psm
cborstreamreader.h
cborstreamwriter.h
pappso::cbor::CborStreamReader
Definition
cborstreamreader.h:45
pappso::cbor::CborStreamWriter
Definition
cborstreamwriter.h:41
pappso::cbor::psm::PsmProteinMap::~PsmProteinMap
virtual ~PsmProteinMap()
Definition
psmproteinmap.cpp:37
pappso::cbor::psm::PsmProteinMap::size
std::size_t size() const
Definition
psmproteinmap.cpp:150
pappso::cbor::psm::PsmProteinMap::m_proteinMap
std::map< QString, PsmProtein > m_proteinMap
Definition
psmproteinmap.h:74
pappso::cbor::psm::PsmProteinMap::getByAccession
const pappso::cbor::psm::PsmProtein & getByAccession(const QString &accession) const
Definition
psmproteinmap.cpp:156
pappso::cbor::psm::PsmProteinMap::insert
std::pair< std::map< QString, pappso::cbor::psm::PsmProtein >::iterator, bool > insert(const PsmProtein &psm_protein)
Definition
psmproteinmap.cpp:42
pappso::cbor::psm::PsmProteinMap::readMap
void readMap(CborStreamReader &reader)
Definition
psmproteinmap.cpp:80
pappso::cbor::psm::PsmProteinMap::PsmProteinMap
PsmProteinMap()
Definition
psmproteinmap.cpp:33
pappso::cbor::psm::PsmProteinMap::writeMap
void writeMap(CborStreamWriter &writer) const
Definition
psmproteinmap.cpp:49
pappso::cbor::psm
Definition
cborscanmapbase.h:37
protein.h
pappso::cbor::psm::PsmProtein
Definition
psmproteinmap.h:40
pappso::cbor::psm::PsmProtein::cborEval
QCborMap cborEval
Definition
psmproteinmap.h:44
pappso::cbor::psm::PsmProtein::isTarget
bool isTarget
Definition
psmproteinmap.h:42
pappso::cbor::psm::PsmProtein::isContaminant
bool isContaminant
Definition
psmproteinmap.h:43
pappso::cbor::psm::PsmProtein::protein_sp
std::shared_ptr< Protein > protein_sp
Definition
psmproteinmap.h:41
pappsomspp
core
processing
cbor
psm
psmproteinmap.h
Generated on Tue Sep 23 2025 09:36:35 for libpappsomspp by
1.13.2