| 
    libpappsomspp
    
   Library for mass spectrometry 
   | 
 
code and decode amino acid string sequence to unique integer More...
#include <aastringcodec.h>
Public Member Functions | |
| AaStringCodec (const AaCode &aaCode) | |
| AaStringCodec (const AaStringCodec &other) | |
| ~AaStringCodec () | |
| std::size_t | getLimitMax (std::size_t size) const | 
| get the maximum code number for a given peptide size   | |
| uint32_t | code (const QString &aa_str) const | 
| get integer from amino acide suite string   | |
| uint32_t | codeLlc (const QString &aa_str) const | 
| get the lowest common denominator integer from amino acide suite string   | |
| uint32_t | codeLlc (std::vector< uint8_t >::const_iterator it_begin, std::size_t size) const | 
| get the lowest common denominator integer from amino acide code vector   | |
| QString | decode (uint32_t code) const | 
| QStringList | decode (const std::vector< uint32_t > &code_list) const | 
| double | getMass (uint32_t code) const | 
| std::vector< CodeToMass > | generateLlcCodeListUpToMaxPeptideSize (std::size_t size) const | 
| generates all possible combination of llc code mass llc : the lowest common code denominator for a given aa formula   | |
| std::vector< CodeToMass > | generateLlcCodeListByMaxPeptideSize (std::size_t size) const | 
| generates all possible combination of llc code mass llc : the lowest common code denominator for a given aa formula   | |
| bool | codeOnlyContains (uint32_t code, const std::vector< uint8_t > &aa_ok) const | 
| tell if a code only contains a list of amino acid   | |
| bool | uniqueCodeContainsAminoAcid (uint32_t code, uint8_t aa_ok, int times) const | 
| tell if a unique code only contains one amino acid 1 or n times   | |
| const AaCode & | getAaCode () const | 
Private Member Functions | |
| void | recGenerateModel (std::vector< CodeToMass > &glist, std::vector< uint8_t > &model, std::size_t position) const | 
| recursive method to generate models   | |
| CodeToMass | generateCodeMassFromModel (const std::vector< uint8_t > &model) const | 
Private Attributes | |
| uint32_t | m_base = 0 | 
| const AaCode & | m_aaCode | 
| std::vector< uint32_t > | m_units | 
code and decode amino acid string sequence to unique integer
Definition at line 51 of file aastringcodec.h.
| AaStringCodec::AaStringCodec | ( | const AaCode & | aaCode | ) | 
Default constructor
Definition at line 33 of file aastringcodec.cpp.
References m_aaCode, m_base, and m_units.
Referenced by AaStringCodec().
| AaStringCodec::AaStringCodec | ( | const AaStringCodec & | other | ) | 
| AaStringCodec::~AaStringCodec | ( | ) | 
| uint32_t pappso::AaStringCodec::code | ( | const QString & | aa_str | ) | const | 
get integer from amino acide suite string
Definition at line 59 of file aastringcodec.cpp.
References code(), m_aaCode, and m_units.
Referenced by code(), codeLlc(), codeLlc(), codeOnlyContains(), decode(), decode(), getLimitMax(), getMass(), and uniqueCodeContainsAminoAcid().
| uint32_t pappso::AaStringCodec::codeLlc | ( | const QString & | aa_str | ) | const | 
get the lowest common denominator integer from amino acide suite string
Definition at line 73 of file aastringcodec.cpp.
References code(), m_aaCode, and m_units.
Referenced by pappso::ProteinIntegerCode::computePeptideCodeFragments().
| uint32_t pappso::AaStringCodec::codeLlc | ( | std::vector< uint8_t >::const_iterator | it_begin, | 
| std::size_t | size ) const | 
get the lowest common denominator integer from amino acide code vector
Definition at line 95 of file aastringcodec.cpp.
| bool pappso::AaStringCodec::codeOnlyContains | ( | uint32_t | code, | 
| const std::vector< uint8_t > & | aa_ok ) const | 
tell if a code only contains a list of amino acid
| code | the code to valid | 
| aa_ok | list of required amino acids | 
Definition at line 269 of file aastringcodec.cpp.
| QStringList pappso::AaStringCodec::decode | ( | const std::vector< uint32_t > & | code_list | ) | const | 
Definition at line 136 of file aastringcodec.cpp.
| QString pappso::AaStringCodec::decode | ( | uint32_t | code | ) | const | 
      
  | 
  private | 
Definition at line 238 of file aastringcodec.cpp.
References pappso::CodeToMass::code, m_aaCode, m_units, and pappso::CodeToMass::mass.
Referenced by generateLlcCodeListUpToMaxPeptideSize(), and recGenerateModel().
| std::vector< CodeToMass > pappso::AaStringCodec::generateLlcCodeListByMaxPeptideSize | ( | std::size_t | size | ) | const | 
generates all possible combination of llc code mass llc : the lowest common code denominator for a given aa formula
generate only for this peptide size
Definition at line 192 of file aastringcodec.cpp.
References m_base, and recGenerateModel().
| std::vector< CodeToMass > pappso::AaStringCodec::generateLlcCodeListUpToMaxPeptideSize | ( | std::size_t | size | ) | const | 
generates all possible combination of llc code mass llc : the lowest common code denominator for a given aa formula
generate from peptide size =1 to peptide size
Definition at line 163 of file aastringcodec.cpp.
References generateCodeMassFromModel(), m_base, and recGenerateModel().
| const pappso::AaCode & pappso::AaStringCodec::getAaCode | ( | ) | const | 
Definition at line 307 of file aastringcodec.cpp.
References m_aaCode.
Referenced by pappso::ProteinIntegerCode::ProteinIntegerCode().
| std::size_t pappso::AaStringCodec::getLimitMax | ( | std::size_t | size | ) | const | 
get the maximum code number for a given peptide size
Definition at line 257 of file aastringcodec.cpp.
| double pappso::AaStringCodec::getMass | ( | uint32_t | code | ) | const | 
      
  | 
  private | 
recursive method to generate models
Definition at line 210 of file aastringcodec.cpp.
References generateCodeMassFromModel(), and recGenerateModel().
Referenced by generateLlcCodeListByMaxPeptideSize(), generateLlcCodeListUpToMaxPeptideSize(), and recGenerateModel().
| bool pappso::AaStringCodec::uniqueCodeContainsAminoAcid | ( | uint32_t | code, | 
| uint8_t | aa_ok, | ||
| int | times ) const | 
tell if a unique code only contains one amino acid 1 or n times
| code | the code to valid | 
| aa_ok | the amino acid the code must contains | 
| times | the number of aa_ok presence in code | 
Definition at line 285 of file aastringcodec.cpp.
      
  | 
  private | 
Definition at line 147 of file aastringcodec.h.
Referenced by AaStringCodec(), AaStringCodec(), code(), codeLlc(), decode(), generateCodeMassFromModel(), getAaCode(), and getMass().
      
  | 
  private | 
Definition at line 146 of file aastringcodec.h.
Referenced by AaStringCodec(), AaStringCodec(), codeOnlyContains(), decode(), generateLlcCodeListByMaxPeptideSize(), generateLlcCodeListUpToMaxPeptideSize(), getLimitMax(), getMass(), and uniqueCodeContainsAminoAcid().
      
  | 
  private | 
Definition at line 148 of file aastringcodec.h.
Referenced by AaStringCodec(), AaStringCodec(), code(), codeLlc(), codeLlc(), generateCodeMassFromModel(), and getLimitMax().