libpappsomspp
Library for mass spectrometry
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 "../exportinmportconfig.h"
31#include "aastringcodec.h"
32#include "../mzrange.h"
33
34namespace pappso
35{
36
37/**
38 * @brief
39 */
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 */
56
57 /**
58 * Destructor
59 */
61
62
63 std::vector<uint32_t>
64 getAaCodeFromMassList(std::vector<double> &mass_list) const;
65
66 std::vector<uint32_t> filterCodeList(std::vector<uint32_t> &code_list) const;
67
68 private:
70
72
73
74 uint32_t m_base = 0;
75
77 {
78 std::uint32_t code = 0;
79 double mz_range_low = 0;
80 double mz = 0;
81 double mz_range_up = 0;
82 };
83
84 std::vector<aaCodeAndMassRange> m_codeMassList;
85};
86} // namespace pappso
code and decodefrom amino acid string to integer
collection of integer code for each amino acid 0 => null 1 to 20 => amino acid sorted by there mass (...
Definition: aacode.h:43
std::vector< aaCodeAndMassRange > m_codeMassList
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39