libpappsomspp
Library for mass spectrometry
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 "../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 /** @brief get amino acid string code from mass delta list
64 * mass delta is a list of masses differences found in a spectrum
65 * see @file /pappsomspp/filers/filtepeakdelta.h functions
66 */
67 std::vector<uint32_t>
68 getAaCodeFromMassList(std::vector<double> &mass_list) const;
69
70 /** @brief filter a list of amino acid string code
71 * find elementary amino acids (one base only) in the list and retrieve 2 or
72 * more amino acid string containing only basic aminio acid found
73 */
74 std::vector<uint32_t> filterCodeList(std::vector<uint32_t> &code_list) const;
75
76 private:
78
80
81
82 uint32_t m_base = 0;
83
85 {
86 std::uint32_t code = 0;
87 double mz_range_low = 0;
88 double mz = 0;
89 double mz_range_up = 0;
90 };
91
92 std::vector<aaCodeAndMassRange> m_codeMassList;
93};
94} // 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