libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
peptide.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/peptide/peptide.cpp
3 * \date 7/3/2015
4 * \author Olivier Langella
5 * \brief peptide model
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
10 *
11 * This file is part of the PAPPSOms++ library.
12 *
13 * PAPPSOms++ 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++ 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++. If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Contributors:
27 * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
28 *implementation
29 ******************************************************************************/
30
31#include <QDebug>
32#include <algorithm>
33#include <qobject.h>
34#include "peptide.h"
40
41
42namespace pappso
43{
44
45
46bool
48{
49 return (l.m_aaVec < r.m_aaVec);
50}
51
52bool
54{
56 return false;
58 return false;
61 return false;
64 return false;
65
66 return (l.m_aaVec == r.m_aaVec);
67}
68
69bool
71{
72 if(peptideIonIsNter(ion_type))
73 std::swap(ion_type_ref, ion_type);
74 if(peptideIonIsNter(ion_type))
75 return false;
76 if((ion_type_ref == Enums::PeptideIon::b) && (ion_type == Enums::PeptideIon::y))
77 return true;
78 if((ion_type_ref == Enums::PeptideIon::ao) && (ion_type == Enums::PeptideIon::yo))
79 return true;
80 if((ion_type_ref == Enums::PeptideIon::bstar) && (ion_type == Enums::PeptideIon::ystar))
81 return true;
82
83 return false;
84}
85
86bool
88{
89 if((std::int8_t)ion_type < (std::int8_t)8)
90 {
91 return true;
92 }
93 return false;
94}
95
98{
99 if(peptideIonIsNter(ion_type))
100 {
102 }
104}
105
106Peptide::Peptide(const QString &pepstr)
107{
108 qDebug();
109 m_cleavageNterMod = AaModification::getInstance("internal:Nter_hydrolytic_cleavage_H");
110 m_cleavageCterMod = AaModification::getInstance("internal:Cter_hydrolytic_cleavage_HO");
111
112 m_NterMod = nullptr;
113 m_CterMod = nullptr;
114 QString::const_iterator it(pepstr.begin());
115
116 while(it != pepstr.end())
117 {
118 qDebug() << it->toLatin1();
119 m_aaVec.push_back(Aa(it->toLatin1()));
120 it++;
121 }
122 qDebug();
123 getMass();
124}
125
129
131 : m_aaVec(peptide.m_aaVec),
132 m_fullC13(peptide.m_fullC13),
133 m_fullN15(peptide.m_fullN15),
134 m_fullH2(peptide.m_fullH2),
135 m_proxyMass(peptide.m_proxyMass),
138 m_NterMod(peptide.m_NterMod),
139 m_CterMod(peptide.m_CterMod)
140{
141 qDebug();
142}
143
144
145Peptide::Peptide(Peptide &&toCopy) // move constructor
146 : m_aaVec(std::move(toCopy.m_aaVec)),
147 m_fullC13(toCopy.m_fullC13),
148 m_fullN15(toCopy.m_fullN15),
149 m_fullH2(toCopy.m_fullH2),
150 m_proxyMass(toCopy.m_proxyMass),
153 m_NterMod(toCopy.m_NterMod),
154 m_CterMod(toCopy.m_CterMod)
155{
156}
157
158
161{
162 return std::make_shared<const Peptide>(*this);
163}
164
167{
168 return std::make_shared<Peptide>(*this);
169}
170
171
172std::vector<Aa>::iterator
174{
175 return m_aaVec.begin();
176}
177
178std::vector<Aa>::iterator
180{
181 return m_aaVec.end();
182}
183
184std::vector<Aa>::const_iterator
186{
187 return m_aaVec.begin();
188}
189
190std::vector<Aa>::const_iterator
192{
193 return m_aaVec.end();
194}
195
196std::vector<Aa>::const_reverse_iterator
198{
199 return m_aaVec.rbegin();
200}
201
202std::vector<Aa>::const_reverse_iterator
204{
205 return m_aaVec.rend();
206}
207
208
211{
212 return m_proxyMass;
213}
214
215
216unsigned int
218{
219 return m_aaVec.size();
220}
221void
222Peptide::addAaModification(AaModificationP aaModification, unsigned int position)
223{
224 if(position >= size())
225 {
226 throw ExceptionOutOfRange(QObject::tr("position (%1) > size (%2)").arg(position).arg(size()));
227 }
228 m_proxyMass = -1;
229 qDebug() << "Peptide::addAaModification begin " << position;
230 std::vector<Aa>::iterator it = m_aaVec.begin() + position;
231 it->addAaModification(aaModification);
232 getMass();
233 qDebug() << "Peptide::addAaModification end";
234}
235
236void
238 Enums::AminoAcidChar amino_acid)
239{
240
241 for(auto &aa : *this)
242 {
243 if(aa.getAminoAcidChar() == amino_acid)
244 {
245 aa.addAaModification(aaModification);
246 }
247 }
248
249
250 m_proxyMass = -1;
251 getMass();
252}
253
254const QString
256{
257 QString seq = "";
258 std::vector<Aa>::const_iterator it(m_aaVec.begin());
259 while(it != m_aaVec.end())
260 {
261 seq += it->getLetter();
262 it++;
263 }
264 return seq;
265}
266const QString
268{
269 QString seq = "";
270 std::vector<Aa>::const_iterator it(m_aaVec.begin());
271
272 QStringList modification_str_list;
273 modification_str_list << m_cleavageNterMod->getAccession();
274 if(m_NterMod != nullptr)
275 modification_str_list << m_NterMod->getAccession();
276 while(it != m_aaVec.end())
277 {
278 seq += it->getLetter();
279 if(it == m_aaVec.end() - 1)
280 {
281 modification_str_list << m_cleavageCterMod->getAccession();
282 if(m_CterMod != nullptr)
283 modification_str_list << m_CterMod->getAccession();
284 }
285 for(auto &pmod : it->getModificationList())
286 {
287 modification_str_list << pmod->getAccession();
288 }
289 if(modification_str_list.size() > 0)
290 seq += QString("(%1)").arg(modification_str_list.join(","));
291 modification_str_list.clear();
292 it++;
293 }
294 return seq;
295}
296
297const QString
299{
300 QString seq = "";
301 std::vector<Aa>::const_iterator it(m_aaVec.begin());
302 while(it != m_aaVec.end())
303 {
304 seq += it->toAbsoluteString();
305 it++;
306 }
307 return seq.replace("L", "I");
308}
309
310
311const QString
313{
314 QString seq = "";
315 std::vector<Aa>::const_iterator it(m_aaVec.begin());
316 while(it != m_aaVec.end())
317 {
318 seq += it->toString();
319 it++;
320 }
321 return seq;
322}
323
324std::vector<double>
326{
327 std::vector<double> raw_mass_arr;
328 for(const Aa &aa : m_aaVec)
329 {
330 raw_mass_arr.push_back(aa.getMass());
331 }
332 return raw_mass_arr;
333}
334
335std::vector<double>
336Peptide::getMassIonSerie(unsigned int charge, pappso::Enums::PeptideIon ion_type) const
337{
338 std::vector<double> mz_arr;
339 double mass_accumulator = 0;
340 double mass_shift = 0;
341 if(ion_type == pappso::Enums::PeptideIon::b)
342 {
343 for(const Aa &aa : m_aaVec)
344 {
345 mass_accumulator += aa.getMass();
346 mz_arr.push_back(mass_accumulator);
347 }
348 }
349 else if(ion_type == pappso::Enums::PeptideIon::y)
350 {
351 std::vector<Aa>::const_reverse_iterator it(m_aaVec.rbegin());
352 while(it != m_aaVec.rend())
353 {
354 mass_accumulator += it->getMass();
355 mz_arr.push_back(mass_accumulator);
356 it++;
357 }
358 mass_shift = MASSH2O;
359 }
360 else
361 {
363 QObject::tr("Peptide::getMassIonSerie not implemented for ion type %1")
364 .arg(Utils::toString(ion_type)));
365 }
366 for(double &mass : mz_arr)
367 {
368 mass = (mass + mass_shift + (MHPLUS * (double)charge)) / (double)charge;
369 }
370
371 return mz_arr;
372}
373
376{
377 qDebug() << "begin";
378 if(m_proxyMass < 0)
379 {
381 {
383 m_proxyMass = formula.getMass();
384 }
385 else
386 {
387 m_proxyMass = m_cleavageNterMod->getMass() + m_cleavageCterMod->getMass();
388 if(m_NterMod != nullptr)
389 m_proxyMass += m_NterMod->getMass();
390 if(m_CterMod != nullptr)
391 m_proxyMass += m_CterMod->getMass();
392 for(auto aa : m_aaVec)
393 {
394 m_proxyMass += aa.getMass();
395 }
396 }
397 }
398 qDebug() << "end " << m_proxyMass;
399 return m_proxyMass;
400}
401
402int
404{
405 int number = m_cleavageNterMod->getNumberOfAtom(atom);
406 number += m_cleavageCterMod->getNumberOfAtom(atom);
407
408 if(m_NterMod != nullptr)
409 number += m_NterMod->getNumberOfAtom(atom);
410 if(m_CterMod != nullptr)
411 number += m_CterMod->getNumberOfAtom(atom);
412 std::vector<Aa>::const_iterator it(m_aaVec.begin());
413 while(it != m_aaVec.end())
414 {
415 number += it->getNumberOfAtom(atom);
416 it++;
417 }
418 // qDebug() << "Aa::getMass() end " << mass;
419 return number;
420}
421
422int
424{
425 int number = m_cleavageNterMod->getNumberOfIsotope(isotope);
426 number += m_cleavageCterMod->getNumberOfIsotope(isotope);
427 if(m_NterMod != nullptr)
428 number += m_NterMod->getNumberOfIsotope(isotope);
429 if(m_CterMod != nullptr)
430 number += m_CterMod->getNumberOfIsotope(isotope);
431 std::vector<Aa>::const_iterator it(m_aaVec.begin());
432 while(it != m_aaVec.end())
433 {
434 number += it->getNumberOfIsotope(isotope);
435 it++;
436 }
437 // qDebug() << "Aa::getMass() end " << mass;
438 return number;
439}
440
441
442unsigned int
444{
445 unsigned int number = 0;
446 std::vector<Aa>::const_iterator it(m_aaVec.begin());
447 while(it != m_aaVec.end())
448 {
449 number += it->getNumberOfModification(mod);
450 it++;
451 }
452 // qDebug() << "Aa::getMass() end " << mass;
453 return number;
454}
455
456unsigned int
457Peptide::countModificationOnAa(AaModificationP mod, const std::vector<char> &aa_list) const
458{
459 unsigned int number = 0;
460 std::vector<Aa>::const_iterator it(m_aaVec.begin());
461 while(it != m_aaVec.end())
462 {
463 if(std::find(aa_list.begin(), aa_list.end(), it->getLetter()) != aa_list.end())
464 {
465 number += it->getNumberOfModification(mod);
466 }
467 it++;
468 }
469 // qDebug() << "Aa::getMass() end " << mass;
470 return number;
471}
472
473void
475{
476 if(oldmod == newmod)
477 return;
478 std::vector<Aa>::iterator it(m_aaVec.begin());
479 while(it != m_aaVec.end())
480 {
481 it->replaceAaModification(oldmod, newmod);
482 it++;
483 }
484 m_proxyMass = -1;
485 getMass();
486}
487
488void
490 AaModificationP oldmod,
491 AaModificationP newmod)
492{
493 if(oldmod == newmod)
494 return;
495 std::vector<Aa>::iterator it(m_aaVec.begin());
496 while(it != m_aaVec.end())
497 {
498 if(it->getAminoAcidChar() == aa)
499 {
500 it->replaceAaModification(oldmod, newmod);
501 }
502 it++;
503 }
504 m_proxyMass = -1;
505 getMass();
506}
507void
509{
510 std::vector<Aa>::iterator it(m_aaVec.begin());
511 while(it != m_aaVec.end())
512 {
513 it->removeAaModification(mod);
514 qDebug() << it->toString() << " " << toAbsoluteString();
515 it++;
516 }
517 m_proxyMass = -1;
518 getMass();
519 // qDebug() << "Aa::getMass() end " << mass;
520}
521std::vector<unsigned int>
523{
524 std::vector<unsigned int> position_list;
525 unsigned int position = 0;
526 std::vector<Aa>::const_iterator it(m_aaVec.begin());
527 while(it != m_aaVec.end())
528 {
529 unsigned int number = 0;
530 number += it->getNumberOfModification(mod);
531 for(unsigned int j = 0; j < number; j++)
532 {
533 position_list.push_back(position);
534 }
535 it++;
536 position++;
537 }
538 // qDebug() << "Aa::getMass() end " << mass;
539 return position_list;
540}
541
542std::vector<unsigned int>
543Peptide::getModificationPositionList(AaModificationP mod, const std::vector<char> &aa_list) const
544{
545 std::vector<unsigned int> position_list;
546 unsigned int position = 0;
547 std::vector<Aa>::const_iterator it(m_aaVec.begin());
548 while(it != m_aaVec.end())
549 {
550 if(std::find(aa_list.begin(), aa_list.end(), it->getLetter()) != aa_list.end())
551 {
552 unsigned int number = 0;
553 number += it->getNumberOfModification(mod);
554 for(unsigned int j = 0; j < number; j++)
555 {
556 position_list.push_back(position);
557 }
558 }
559 it++;
560 position++;
561 }
562 // qDebug() << "Aa::getMass() end " << mass;
563 return position_list;
564}
565
566std::vector<unsigned int>
568{
569 std::vector<unsigned int> position_list;
570 unsigned int number = 0;
571 std::vector<Aa>::const_iterator it(m_aaVec.begin());
572 while(it != m_aaVec.end())
573 {
574 if(it->getLetter() == aa)
575 position_list.push_back(number);
576 number++;
577 it++;
578 }
579 // qDebug() << "Aa::getMass() end " << mass;
580 return position_list;
581}
582
583std::vector<unsigned int>
584Peptide::getAaPositionList(std::list<char> list_aa) const
585{
586 std::vector<unsigned int> position_list;
587 unsigned int number = 0;
588 std::vector<Aa>::const_iterator it(m_aaVec.begin());
589 while(it != m_aaVec.end())
590 {
591
592 bool found = (std::find(list_aa.begin(), list_aa.end(), it->getLetter()) != list_aa.end());
593 if(found)
594 {
595 position_list.push_back(number);
596 }
597 number++;
598 it++;
599 }
600 // qDebug() << "Aa::getMass() end " << mass;
601 return position_list;
602}
603
604void
606{
607 if(mod->getAccession().startsWith("internal:Nter_"))
608 {
609 m_proxyMass = -1;
610 m_cleavageNterMod = mod;
611 getMass();
612 }
613 else
614 {
616 QObject::tr("modification is not a cleavage Nter modification : %1")
617 .arg(mod->getAccession()));
618 }
619}
620void
622{
623 if(mod->getAccession().startsWith("internal:Cter_"))
624 {
625 m_proxyMass = -1;
626 m_cleavageNterMod = mod;
627 getMass();
628 }
629 else
630 {
632 QObject::tr("modification is not a cleavage Cter modification : %1")
633 .arg(mod->getAccession()));
634 }
635}
636
647
648void
650{
651 if(mod != nullptr)
652 {
653 m_proxyMass = -1;
654 m_NterMod = mod;
655 getMass();
656 }
657 else
658 {
660 QObject::tr("modification is not a peptide Nter modification : mod == nulptr"));
661 }
662}
663void
665{
666 if(mod != nullptr)
667 {
668 m_proxyMass = -1;
669 m_CterMod = mod;
670 getMass();
671 }
672 else
673 {
675 QObject::tr("modification is not a peptide Cter modification : mod == nulptr"));
676 }
677}
678
681{
682 return m_CterMod;
683}
684
687{
688 return m_NterMod;
689}
690
691void
693{
694 std::rotate(m_aaVec.begin(), m_aaVec.begin() + 1, m_aaVec.end());
695}
696
697void
699{
700 std::reverse(m_aaVec.begin(), m_aaVec.end());
701}
702
703
704bool
706{
707 std::size_t size = m_aaVec.size();
708 std::size_t k = (size - 1);
709 for(std::size_t i = 0; i < (size / 2); i++, k--)
710 {
711 if(m_aaVec[i].getLetter() != m_aaVec[k].getLetter())
712 {
713 return false;
714 }
715 }
716 return true;
717}
718
719Aa &
720Peptide::getAa(unsigned int position)
721{
722 if(position >= m_aaVec.size())
723 {
724 throw ExceptionOutOfRange(QObject::tr("no AA at position %1").arg(position));
725 }
726 return m_aaVec.at(position);
727}
728const Aa &
729Peptide::getConstAa(unsigned int position) const
730{
731 if(position >= m_aaVec.size())
732 {
733 throw ExceptionOutOfRange(QObject::tr("no AA at position %1").arg(position));
734 }
735 return m_aaVec.at(position);
736}
737
738
739void
741{
742
743 std::vector<Aa>::iterator it(m_aaVec.begin());
744 std::vector<Aa>::iterator itend(m_aaVec.end());
745 for(; it != itend; it++)
746 {
747 it->replaceLeucineIsoleucine();
748 }
749}
750
751
752void
754{
755 std::vector<Aa>::iterator it(m_aaVec.begin());
756 if(it != m_aaVec.end())
757 {
758 m_aaVec.erase(it);
759 m_proxyMass = -1;
760 getMass();
761 }
762 else
763 {
764 throw ExceptionOutOfRange(QObject::tr("peptide is empty"));
765 }
766}
767
768
769void
771{
772 std::vector<Aa>::iterator it(m_aaVec.end());
773 it--;
774 if(it != m_aaVec.end())
775 {
776 m_aaVec.erase(it);
777 m_proxyMass = -1;
778 getMass();
779 }
780 else
781 {
782 throw ExceptionOutOfRange(QObject::tr("peptide is empty"));
783 }
784}
785
786QString
788{
789
790 QString seq = "";
791 if(m_fullC13)
792 {
793 seq += "<13C>";
794 }
795 if(m_fullN15)
796 {
797 seq += "<15N>";
798 }
799 if(m_fullH2)
800 {
801 seq += "<D>";
802 }
803
804 if(m_NterMod != nullptr)
805 {
806 QString nter_accession = m_NterMod->getAccession();
807 seq = QString("[%1]-").arg(nter_accession);
808 }
809 std::vector<Aa>::const_iterator it(m_aaVec.begin());
810 while(it != m_aaVec.end())
811 {
812 seq += it->toProForma();
813 it++;
814 }
815
816 if(m_CterMod != nullptr)
817 {
818 QString cter_accession = m_CterMod->getAccession();
819 seq += QString("-[%1]").arg(cter_accession);
820 }
821 return seq;
822}
823} // namespace pappso
824
825void
827{
828 if(isotope_kind == Enums::Isotope::C13)
829 m_fullC13 = true;
830 else if(isotope_kind == Enums::Isotope::N15)
831 m_fullN15 = true;
832 else if(isotope_kind == Enums::Isotope::H2)
833 m_fullH2 = true;
834}
835
836
842
843
846{
848
849 qDebug() << formula.toString();
850 if(m_fullC13)
851 {
853 qDebug() << formula.toString();
854 }
855 if(m_fullN15)
856 {
858 qDebug() << formula.toString();
859 }
860 if(m_fullH2)
861 {
863 qDebug() << formula.toString();
864 }
865 return formula;
866}
const QString & getAccession() const
static AaModificationP getInstance(const QString &accession)
const QString toString() const
void setFullIsotope(Enums::Isotope isotope)
set full isotope labels
virtual const ChemicalFormula getChemicalFormulaCharge(unsigned int charge) const
AaModificationP m_cleavageCterMod
Definition peptide.h:274
void replaceLeucineIsoleucine()
Definition peptide.cpp:740
PeptideSp makePeptideSp() const
Definition peptide.cpp:160
Peptide(const QString &pepstr)
Definition peptide.cpp:106
AaModificationP getCterModification() const
Definition peptide.cpp:680
void setNterModification(AaModificationP mod)
Definition peptide.cpp:649
void replaceAaModification(AaModificationP oldmod, AaModificationP newmod)
replaces all occurences of a modification by a new one
Definition peptide.cpp:474
void removeNterAminoAcid()
Definition peptide.cpp:753
std::vector< Aa >::const_reverse_iterator rend() const
Definition peptide.cpp:203
virtual const ChemicalFormula getChemicalFormulaCharge(unsigned int charge) const override
Definition peptide.cpp:845
std::vector< unsigned int > getModificationPositionList(AaModificationP mod) const
get modification positions
Definition peptide.cpp:522
NoConstPeptideSp makeNoConstPeptideSp() const
Definition peptide.cpp:166
virtual int getNumberOfIsotope(Enums::Isotope isotope) const override
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Definition peptide.cpp:423
virtual bool isPalindrome() const override
tells if the peptide sequence is a palindrome
Definition peptide.cpp:705
std::vector< Aa >::const_reverse_iterator rbegin() const
Definition peptide.cpp:197
AaModificationP getCleavageCterModification() const
Definition peptide.cpp:643
const QString getLiAbsoluteString() const
get all sequence string with modifications and converting Leucine to Isoleucine
Definition peptide.cpp:298
void removeCterAminoAcid()
Definition peptide.cpp:770
void setGlobalModification(Enums::Isotope isotope_kind)
apply 100% isotope replacement
Definition peptide.cpp:826
void setCleavageCterModification(AaModificationP mod)
Definition peptide.cpp:621
void setCterModification(AaModificationP mod)
Definition peptide.cpp:664
AaModificationP m_NterMod
Definition peptide.h:275
virtual const ChemicalFormula getChemicalFormula() const override
Definition peptide.cpp:838
void replaceAaModificationOnAminoAcid(Enums::AminoAcidChar aa, pappso::AaModificationP oldmod, pappso::AaModificationP newmod)
replaces all occurences of a modification by a new one on a specific amino acid
Definition peptide.cpp:489
AaModificationP m_cleavageNterMod
Definition peptide.h:272
const QString toAbsoluteString() const
print all modifications
Definition peptide.cpp:267
virtual ~Peptide()
Definition peptide.cpp:126
AaModificationP getNterModification() const
Definition peptide.cpp:686
unsigned int getNumberOfModification(AaModificationP mod) const
count modification occurence
Definition peptide.cpp:443
std::vector< double > getMassIonSerie(unsigned int charge, pappso::Enums::PeptideIon ion_type) const
get complete serie of product masses for a given charge and ion type
Definition peptide.cpp:336
const QString toString() const
print modification except internal modifications
Definition peptide.cpp:312
std::vector< double > getRawMassArray() const
get raw mass array of the amino acid sequence
Definition peptide.cpp:325
QString toProForma() const
get the peptide model in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README....
Definition peptide.cpp:787
AaModificationP getCleavageNterModification() const
Definition peptide.cpp:638
void removeAaModification(AaModificationP mod)
removes all occurences of a modification
Definition peptide.cpp:508
unsigned int size() const override
Definition peptide.cpp:217
virtual int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const override
get the number of atom C, O, N, H in the molecule
Definition peptide.cpp:403
void setCleavageNterModification(AaModificationP mod)
Definition peptide.cpp:605
Aa & getAa(unsigned int position)
Definition peptide.cpp:720
void addAaModificationOnAllAminoAcid(AaModificationP aaModification, Enums::AminoAcidChar amino_acid)
adds a modification to all amino acid of the sequence
Definition peptide.cpp:237
std::vector< unsigned int > getAaPositionList(char aa) const
get positions of one amino acid in peptide
Definition peptide.cpp:567
pappso_double getMass()
Definition peptide.cpp:375
std::vector< Aa >::iterator begin()
Definition peptide.cpp:173
const QString getSequence() const override
print amino acid sequence without modifications
Definition peptide.cpp:255
void addAaModification(AaModificationP aaModification, unsigned int position)
adds a modification to amino acid sequence
Definition peptide.cpp:222
std::vector< Aa >::iterator end()
Definition peptide.cpp:179
double m_proxyMass
Definition peptide.h:270
AaModificationP m_CterMod
Definition peptide.h:276
std::vector< Aa > m_aaVec
Definition peptide.h:266
unsigned int countModificationOnAa(AaModificationP mod, const std::vector< char > &aa_list) const
count modification occurence
Definition peptide.cpp:457
const Aa & getConstAa(unsigned int position) const
Definition peptide.cpp:729
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:544
PeptideIon
Enums::PeptideIon enum defines all types of ions (Nter or Cter).
Definition types.h:286
@ y
Cter amino ions.
Definition types.h:295
@ ystar
Cter amino ions + NH3 loss.
Definition types.h:296
@ yo
Cter amino ions + H2O loss.
Definition types.h:297
@ bstar
Nter acylium ions + NH3 loss.
Definition types.h:288
@ b
Nter acylium ions.
Definition types.h:287
@ ao
Nter aldimine ions + H2O loss.
Definition types.h:292
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
bool peptideIonTypeIsComplement(Enums::PeptideIon ion_type_ref, Enums::PeptideIon ion_type)
tells if an ion type is the complement ion of the other
Definition peptide.cpp:70
bool operator<(Aa const &l, Aa const &r)
Definition aa.cpp:292
std::shared_ptr< const Peptide > PeptideSp
PeptideDirection
Definition peptide.h:47
const AaModification * AaModificationP
const pappso_double MHPLUS(1.007276466879)
double pappso_double
A type definition for doubles.
Definition types.h:60
PeptideDirection getPeptideIonDirection(Enums::PeptideIon ion_type)
get the direction of a peptide ion
Definition peptide.cpp:97
const pappso_double MASSH2O((MPROTIUM *2)+MASSOXYGEN)
bool peptideIonIsNter(Enums::PeptideIon ion_type)
tells if an ion is Nter
Definition peptide.cpp:87
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:286
std::shared_ptr< Peptide > NoConstPeptideSp
Definition peptide.h:98