Loading...
Searching...
No Matches
aacode.h
Go to the documentation of this file.
/**
* \file pappsomspp/amino_acid/aacode.h
* \date 03/05/2023
* \author Olivier Langella
* \brief give an integer code to each amino acid
*/
/*******************************************************************************
* Copyright (c) 2023 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of PAPPSOms-tools.
*
* PAPPSOms-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include "../exportinmportconfig.h"
#include <vector>
#include "aa.h"
namespace pappso
{
/**
* @brief collection of integer code for each amino acid
* 0 => null
* 1 to 20 => amino acid sorted by there mass (lower to higher). Leucine is
* replaced by Isoleucine
*/
class PMSPP_LIB_DECL AaCode
{
public:
/**
* Default constructor
*/
AaCode();
/**
* Default copy constructor
*/
AaCode(const AaCode &other);
/**
* Destructor
*/
~AaCode();
uint8_t getAaCode(char aa_letter) const;
const Aa &getAa(char aa_letter) const;
const Aa &getAa(uint8_t aa_code) const;
double getMass(uint8_t aa_code) const;
void addAaModification(char aa_letter, AaModificationP aaModification);
std::size_t getSize() const;
private:
/** @brief give a number (the code) to each amino acid sorted by mass
*/
void updateNumbers();
/** @brief update mass cache
*/
void updateMass();
private:
std::vector<uint8_t> m_asciiTable;
std::vector<Aa> m_aaCollection;
std::vector<double> m_massCollection;
};
} // namespace pappso
aa.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:43
pappso::AaCode::m_massCollection
std::vector< double > m_massCollection
Definition aacode.h:84
pappso::AaCode::m_asciiTable
std::vector< uint8_t > m_asciiTable
Definition aacode.h:81
pappso::AaCode::m_aaCollection
std::vector< Aa > m_aaCollection
Definition aacode.h:83
pappso::AaModification
Definition aamodification.h:57
pappso::Aa
Definition aa.h:45
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39