85 return m_asciiTable[aa_letter];
92 auto it = std::find_if(
93 m_aaCollection.begin(), m_aaCollection.end(), [aa_letter](
const Aa &aa) {
94 if(aa.getLetter() == aa_letter)
98 if(it != m_aaCollection.end())
103 QObject::tr(
"error, %1 amino acid not found in m_aaCollection")
114 QObject::tr(
"error, 0 is null : no amino acid").arg(aa_code));
116 else if(aa_code > 19)
119 QObject::tr(
"error, %1 amino acid code not found in m_aaCollection")
122 return m_aaCollection[aa_code - 1];
131 auto it = std::find_if(
132 m_aaCollection.begin(), m_aaCollection.end(), [aa_letter](
const Aa &aa) {
133 if(aa.getLetter() == aa_letter)
137 if(it != m_aaCollection.end())
139 it->addAaModification(aaModification);
144 QObject::tr(
"error, %1 amino acid not found in m_aaCollection")
157 m_aaCollection.begin(),
158 m_aaCollection.end(),
159 [](
const Aa &aa1,
const Aa &aa2) { return aa1.getMass() < aa2.getMass(); });
162 for(
const Aa &aa : m_aaCollection)
165 m_asciiTable[aa.getLetter()] = n;
168 m_asciiTable[
'L'] = m_asciiTable[
'I'];
176 m_massCollection.resize(1);
178 for(
const Aa &aa : m_aaCollection)
180 m_massCollection.push_back(aa.getMass());
188 return m_massCollection[aa_code];
give an integer code to each amino acid
collection of integer code for each amino acid 0 => null 1 to 20 => amino acid sorted by there mass (...
void updateNumbers()
give a number (the code) to each amino acid sorted by mass
void addAaModification(char aa_letter, AaModificationP aaModification)
std::vector< uint8_t > m_asciiTable
void updateMass()
update mass cache
uint8_t getAaCode(char aa_letter) const
double getMass(uint8_t aa_code) const
std::size_t getSize() const
std::vector< Aa > m_aaCollection
const Aa & getAa(char aa_letter) const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...