libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
aastringcodemassmatching.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/amino_acid/aastringcodemassmatching.h
3
* \date 10/05/2023
4
* \author Olivier Langella
5
* \brief convert mass list to amino acid string code list
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2023 Olivier Langella <Olivier.Langella@u-psud.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
28
#pragma once
29
30
#include "
pappsomspp/export-import-config.h
"
31
#include "
pappsomspp/core/amino_acid/aastringcodec.h
"
32
#include "
pappsomspp/core/mzrange.h
"
33
34
namespace
pappso
35
{
36
37
/**
38
* @brief convert a list of mass to amino acid string codes
39
*/
40
class
PMSPP_LIB_DECL
AaStringCodeMassMatching
41
{
42
public
:
43
/**
44
* Default constructor
45
*/
46
AaStringCodeMassMatching
(
const
AaCode
&aa_code,
47
std::size_t model_max_size,
48
PrecisionPtr
precision);
49
50
/**
51
* Copy constructor
52
*
53
* @param other TODO
54
*/
55
AaStringCodeMassMatching
(
const
AaStringCodeMassMatching
&other);
56
57
/**
58
* Destructor
59
*/
60
~AaStringCodeMassMatching
();
61
62
PrecisionPtr
getPrecisionPtr
()
const
;
63
64
65
/** @brief get amino acid string code from mass delta list
66
* mass delta is a list of masses differences found in a spectrum
67
* see @file /pappsomspp/filers/filtepeakdelta.h functions
68
*/
69
std::vector<uint32_t>
70
getAaCodeFromMassList
(std::vector<double> &mass_list)
const
;
71
72
73
/** @brief get amino acid string code from a single mass delta
74
* @param mass the mass to look for
75
*/
76
std::vector<uint32_t>
getAaCodeFromMass
(
double
mass)
const
;
77
78
79
/** @brief get amino acid string code from a single mass delta wearing a
80
* specific modification
81
* @param mass the mass to look for
82
* @param aa amino acid with modification
83
* @param quantifier the minimum number of this aa modified required in the
84
* given aa sequence
85
*/
86
std::vector<uint32_t>
getAaCodeFromMassWearingModification
(
87
double
mass,
const
Aa
&aa,
int
quantifier)
const
;
88
89
90
/** @brief filter a list of amino acid string code
91
* find elementary amino acids (one base only) in the list and retrieve 2 or
92
* more amino acid string containing only basic aminio acid found
93
*/
94
std::vector<uint32_t>
filterCodeList
(std::vector<uint32_t> &code_list)
const
;
95
96
private
:
97
PrecisionPtr
m_precision
=
nullptr
;
98
const
AaCode
&
m_aaCode
;
99
100
AaStringCodec
m_aaCodec
;
101
102
103
uint32_t
m_base
= 0;
104
105
struct
aaCodeAndMassRange
106
{
107
std::uint32_t
code
= 0;
108
double
mz_range_low
= 0;
109
double
mz
= 0;
110
double
mz_range_up
= 0;
111
};
112
113
std::vector<aaCodeAndMassRange>
m_codeMassList
;
114
};
115
}
// namespace pappso
aastringcodec.h
pappso::AaCode
collection of integer code for each amino acid 0 => null 1 to 20 => amino acid sorted by there mass (...
Definition
aacode.h:44
pappso::AaStringCodeMassMatching::m_codeMassList
std::vector< aaCodeAndMassRange > m_codeMassList
Definition
aastringcodemassmatching.h:113
pappso::AaStringCodeMassMatching::filterCodeList
std::vector< uint32_t > filterCodeList(std::vector< uint32_t > &code_list) const
filter a list of amino acid string code find elementary amino acids (one base only) in the list and r...
Definition
aastringcodemassmatching.cpp:212
pappso::AaStringCodeMassMatching::m_base
uint32_t m_base
Definition
aastringcodemassmatching.h:103
pappso::AaStringCodeMassMatching::getAaCodeFromMass
std::vector< uint32_t > getAaCodeFromMass(double mass) const
get amino acid string code from a single mass delta
Definition
aastringcodemassmatching.cpp:85
pappso::AaStringCodeMassMatching::getPrecisionPtr
PrecisionPtr getPrecisionPtr() const
Definition
aastringcodemassmatching.cpp:78
pappso::AaStringCodeMassMatching::AaStringCodeMassMatching
AaStringCodeMassMatching(const AaCode &aa_code, std::size_t model_max_size, PrecisionPtr precision)
Definition
aastringcodemassmatching.cpp:36
pappso::AaStringCodeMassMatching::getAaCodeFromMassWearingModification
std::vector< uint32_t > getAaCodeFromMassWearingModification(double mass, const Aa &aa, int quantifier) const
get amino acid string code from a single mass delta wearing a specific modification
Definition
aastringcodemassmatching.cpp:129
pappso::AaStringCodeMassMatching::m_aaCodec
AaStringCodec m_aaCodec
Definition
aastringcodemassmatching.h:100
pappso::AaStringCodeMassMatching::getAaCodeFromMassList
std::vector< uint32_t > getAaCodeFromMassList(std::vector< double > &mass_list) const
Definition
aastringcodemassmatching.cpp:181
pappso::AaStringCodeMassMatching::m_aaCode
const AaCode & m_aaCode
Definition
aastringcodemassmatching.h:98
pappso::AaStringCodeMassMatching::m_precision
PrecisionPtr m_precision
Definition
aastringcodemassmatching.h:97
pappso::AaStringCodec
code and decode amino acid string sequence to unique integer
Definition
aastringcodec.h:52
pappso::Aa
Definition
aa.h:45
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
mzrange.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::PrecisionPtr
const PrecisionBase * PrecisionPtr
Definition
precision.h:122
pappso::AaStringCodeMassMatching::aaCodeAndMassRange
Definition
aastringcodemassmatching.h:106
pappso::AaStringCodeMassMatching::aaCodeAndMassRange::mz_range_low
double mz_range_low
Definition
aastringcodemassmatching.h:108
pappso::AaStringCodeMassMatching::aaCodeAndMassRange::mz
double mz
Definition
aastringcodemassmatching.h:109
pappso::AaStringCodeMassMatching::aaCodeAndMassRange::code
std::uint32_t code
Definition
aastringcodemassmatching.h:107
pappso::AaStringCodeMassMatching::aaCodeAndMassRange::mz_range_up
double mz_range_up
Definition
aastringcodemassmatching.h:110
pappsomspp
core
amino_acid
aastringcodemassmatching.h
Generated on
for libpappsomspp by
1.17.0