libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
scorevalues.cpp
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/processing/specglob/scorevalues.h
3
* \date 06/11/2023
4
* \author Olivier Langella
5
* \brief scores to apply in comparisons
6
*
7
* C++ implementation of the SpecGlob algorithm described in :
8
* 1. Prunier, G. et al. Fast alignment of mass spectra in large proteomics
9
* datasets, capturing dissimilarities arising from multiple complex
10
* modifications of peptides. BMC Bioinformatics 24, 421 (2023).
11
*
12
* HAL Id : hal-04296170 , version 1
13
* Mot de passe : hxo20cl
14
* DOI : 10.1186/s12859-023-05555-y
15
*/
16
17
18
/*
19
* SpecGlobTool, Spectra to peptide alignment tool
20
* Copyright (C) 2023 Olivier Langella
21
* <olivier.langella@universite-paris-saclay.fr>
22
*
23
* This program is free software: you can redistribute it and/or modify
24
* it under the terms of the GNU General Public License as published by
25
* the Free Software Foundation, either version 3 of the License, or
26
* (at your option) any later version.
27
*
28
* This program is distributed in the hope that it will be useful,
29
* but WITHOUT ANY WARRANTY; without even the implied warranty of
30
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31
* GNU General Public License for more details.
32
*
33
* You should have received a copy of the GNU General Public License
34
* along with this program. If not, see <http://www.gnu.org/licenses/>.
35
*
36
*/
37
38
#include "
scorevalues.h
"
39
#include <algorithm>
40
41
42
namespace
pappso
43
{
44
namespace
specglob
45
{
46
ScoreValues::ScoreValues
()
47
{
48
49
// #Scores to apply
50
// #Score for non alignment (int)
51
// sg.scoreNonAlign=-4
52
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreNonAlign
] = -4;
53
54
// #Score for re-alignment (int)
55
// sg.scoreReAlignNative=-8
56
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignNative
] = -8;
57
// sg.scoreReAlignSym=-8
58
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignSym
] = -8;
59
// sg.scoreReAlignBoth=-6
60
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignBoth
] = -6;
61
62
// #Score for good alignment(int)
63
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreAlignNative
] = 7;
64
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreAlignSym
] = 7;
65
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreAlignBoth
] = 10;
66
67
68
// #Score for re - alignment without offset(int)
69
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignNativeNO
] = 4;
70
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignSymNO
] = 4;
71
m_scoreTable
[(std::uint8_t)
ScoreValueType::scoreReAlignBothNO
] = 7;
72
}
73
74
ScoreValues::ScoreValues
(
const
ScoreValues
&other)
75
{
76
std::copy(other.
m_scoreTable
, other.
m_scoreTable
+ 10,
m_scoreTable
);
77
}
78
79
ScoreValues::~ScoreValues
()
80
{
81
}
82
83
int
84
ScoreValues::get
(
ScoreValueType
type)
85
{
86
return
m_scoreTable
[(std::uint8_t)type];
87
}
88
89
void
90
ScoreValues::set
(
ScoreValueType
type,
int
value)
91
{
92
m_scoreTable
[(std::uint8_t)type] = value;
93
}
94
95
const
ScoreValues
&
96
ScoreValues::operator=
(
const
ScoreValues
&other)
97
{
98
std::copy(other.
m_scoreTable
, other.
m_scoreTable
+ 10,
m_scoreTable
);
99
return
*
this
;
100
}
101
}
// namespace specglob
102
}
// namespace pappso
pappso::specglob::ScoreValues
Definition
scorevalues.h:54
pappso::specglob::ScoreValues::set
void set(ScoreValueType type, int value)
Definition
scorevalues.cpp:90
pappso::specglob::ScoreValues::get
int get(ScoreValueType type)
Definition
scorevalues.cpp:84
pappso::specglob::ScoreValues::~ScoreValues
virtual ~ScoreValues()
Definition
scorevalues.cpp:79
pappso::specglob::ScoreValues::operator=
const ScoreValues & operator=(const ScoreValues &other)
Definition
scorevalues.cpp:96
pappso::specglob::ScoreValues::m_scoreTable
int m_scoreTable[10]
Definition
scorevalues.h:76
pappso::specglob::ScoreValues::ScoreValues
ScoreValues()
Definition
scorevalues.cpp:46
pappso::specglob
Definition
experimentalspectrum.cpp:44
pappso::specglob::ScoreValueType
ScoreValueType
Definition
types.h:57
pappso::specglob::ScoreValueType::scoreAlignNative
@ scoreAlignNative
Score for good alignment native (int).
Definition
types.h:65
pappso::specglob::ScoreValueType::scoreReAlignSymNO
@ scoreReAlignSymNO
Score for re-alignment without offset symmetric (int).
Definition
types.h:71
pappso::specglob::ScoreValueType::scoreNonAlign
@ scoreNonAlign
Score for non alignment (int).
Definition
types.h:58
pappso::specglob::ScoreValueType::scoreAlignBoth
@ scoreAlignBoth
Score for good alignment both (int).
Definition
types.h:67
pappso::specglob::ScoreValueType::scoreReAlignBoth
@ scoreReAlignBoth
Score for re-alignment both (int).
Definition
types.h:62
pappso::specglob::ScoreValueType::scoreReAlignBothNO
@ scoreReAlignBothNO
Score for re-alignment without offset both (int).
Definition
types.h:73
pappso::specglob::ScoreValueType::scoreReAlignSym
@ scoreReAlignSym
Score for re-alignment symmetric (int).
Definition
types.h:61
pappso::specglob::ScoreValueType::scoreReAlignNative
@ scoreReAlignNative
Definition
types.h:60
pappso::specglob::ScoreValueType::scoreAlignSym
@ scoreAlignSym
Score for good alignment symmetric (int).
Definition
types.h:66
pappso::specglob::ScoreValueType::scoreReAlignNativeNO
@ scoreReAlignNativeNO
Score for re-alignment without offset native (int).
Definition
types.h:69
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
scorevalues.h
pappsomspp
core
processing
specglob
scorevalues.cpp
Generated on
for libpappsomspp by
1.17.0