| 1 | /** |
| 2 | * \file protein/proteinpresenceabsencematrix.h |
| 3 | * \date 07/02/2024 |
| 4 | * \author Olivier Langella |
| 5 | * \brief presence/absence matrix of amino acid code along the protein sequence |
| 6 | */ |
| 7 | |
| 8 | /******************************************************************************* |
| 9 | * Copyright (c) 2024 Olivier Langella |
| 10 | *<[email protected]>. |
| 11 | * |
| 12 | * This file is part of PAPPSOms++. |
| 13 | * |
| 14 | * PAPPSOms++ is free software: you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License as published by |
| 16 | * the Free Software Foundation, either version 3 of the License, or |
| 17 | * (at your option) any later version. |
| 18 | * |
| 19 | * PAPPSOms++ is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>. |
| 26 | * |
| 27 | ******************************************************************************/ |
| 28 | |
| 29 | #pragma once |
| 30 | |
| 31 | #include "pappsomspp/export-import-config.h"cxx . . $ `<file>/src/pappsomspp/export-import-config.h`/ |
| 32 | #include <vector> |
| 33 | #include <boost/numeric/ublas/matrix.hpp> |
| 34 | |
| 35 | namespace pappsocxx . . $ pappso/ |
| 36 | { |
| 37 | |
| 38 | class ProteinIntegerCodecxx . . $ pappso/ProteinIntegerCode#; |
| 39 | |
| 40 | /** |
| 41 | * @brief |
| 42 | */ |
| 43 | class PMSPP_LIB_DECLcxx . . $ `src/pappsomspp/export-import-config.h:10:9`! ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix# |
| 44 | { |
| 45 | public: |
| 46 | /** |
| 47 | * Default constructor |
| 48 | */ |
| 49 | ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrix(49f6e7a06ebc5aa8).(); |
| 50 | |
| 51 | |
| 52 | /** |
| 53 | * copy constructor |
| 54 | */ |
| 55 | ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrix(a6e0702a177f1663).(const ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix# &other); |
| 56 | |
| 57 | /** |
| 58 | * Destructor |
| 59 | */ |
| 60 | virtual ~cxx . . $ pappso/ProteinPresenceAbsenceMatrix#`~ProteinPresenceAbsenceMatrix`(ced63f7c635d850d).ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#(); |
| 61 | |
| 62 | ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix# & |
| 63 | operatorcxx . . $ pappso/ProteinPresenceAbsenceMatrix#`operator=`(cd1c86db97049b96).=(const ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix# &other); |
| 64 | |
| 65 | void fillMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#fillMatrix(172896281e813b27).(const pappsocxx . . $ pappso/::ProteinIntegerCodecxx . . $ pappso/ProteinIntegerCode# &coded_protein, |
| 66 | const stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint32_tcxx . . $ uint32_t#> &code_list_from_spectrum); |
| 67 | |
| 68 | /** @brief process convolution of spectrum code list along protein sequence |
| 69 | */ |
| 70 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<double> convolutioncxx . . $ pappso/ProteinPresenceAbsenceMatrix#convolution(933de244a6110113).() const; |
| 71 | |
| 72 | enum class ProteinPresenceAbsenceMatrixElementcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrixElement# : stdcxx . . $ std/::uint8_tcxx . . $ std/uint8_t# |
| 73 | { |
| 74 | absentcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrixElement#absent. = 0, ///< the aa sequence code is not present |
| 75 | presentcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrixElement#present. = 1, ///< the aa sequence code is present |
| 76 | }; |
| 77 | |
| 78 | |
| 79 | const boostcxx . . $ boost/::numericcxx . . $ boost/numeric/::ublascxx . . $ boost/numeric/ublas/::matrixcxx . . $ boost/numeric/ublas/matrix#< |
| 80 | pappsocxx . . $ pappso/::ProteinPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#::ProteinPresenceAbsenceMatrixElementcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrixElement#> & |
| 81 | getPresenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#getPresenceAbsenceMatrix(5919f21e353c1841).() const; |
| 82 | |
| 83 | |
| 84 | private: |
| 85 | double convolutionKernelcxx . . $ pappso/ProteinPresenceAbsenceMatrix#convolutionKernel(14f2d1c4d23ae1d7).(stdcxx . . $ std/::size_tcxx . . $ std/size_t# position) const; |
| 86 | double getScorecxx . . $ pappso/ProteinPresenceAbsenceMatrix#getScore(a53f20f0939ea3f4).(stdcxx . . $ std/::size_tcxx . . $ std/size_t# seq_position, stdcxx . . $ std/::size_tcxx . . $ std/size_t# aa_fragment_size) const; |
| 87 | |
| 88 | |
| 89 | private: |
| 90 | boostcxx . . $ boost/::numericcxx . . $ boost/numeric/::ublascxx . . $ boost/numeric/ublas/::matrixcxx . . $ boost/numeric/ublas/matrix#<ProteinPresenceAbsenceMatrixElementcxx . . $ pappso/ProteinPresenceAbsenceMatrix#ProteinPresenceAbsenceMatrixElement#> |
| 91 | m_presenceAbsenceMatrixcxx . . $ pappso/ProteinPresenceAbsenceMatrix#m_presenceAbsenceMatrix.; |
| 92 | }; |
| 93 | } // namespace pappso |