libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
peptidemodel.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/specglob/peptidemodel.h
3 * \date 14/11/2023
4 * \author Olivier Langella
5 * \brief SpecGlobTool peptide model
6 *
7 * C++ implementation of the SpecGlob algorithm described in :
8 * 1. Prunier, G. et al. Fast alignment of mass spectra in large proteomics
9 * datasets, capturing dissimilarities arising from multiple complex
10 * modifications of peptides. BMC Bioinformatics 24, 421 (2023).
11 *
12 * HAL Id : hal-04296170 , version 1
13 * Mot de passe : hxo20cl
14 * DOI : 10.1186/s12859-023-05555-y
15 */
16
17
18/*
19 * SpecGlobTool, Spectra to peptide alignment tool
20 * Copyright (C) 2023 Olivier Langella
21 * <olivier.langella@universite-paris-saclay.fr>
22 *
23 * This program is free software: you can redistribute ipetide to spectrum
24 * alignmentt and/or modify it under the terms of the GNU General Public License
25 * as published by the Free Software Foundation, either version 3 of the
26 * License, or (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
35 *
36 */
37
38#include "peptidemodel.h"
42
43
44namespace pappso
45{
46namespace specglob
47{
49{
50 // not valid
51}
52
54 const pappso::Peptide &peptide)
55 : std::vector<AminoAcidModel>()
56{
58 mcsp_peakList = qmass_spectrum.getMassSpectrumCstSPtr();
61 for(auto aa_pep : peptide)
62 {
63
64 push_back({aa_pep, SpectralAlignmentType::nonAlign, false, 0.0});
65 }
66
67 // internal:Nter_hydrolytic_cleavage_H
68
69 // internal:Cter_hydrolytic_cleavage_HO
70 //
71}
72
87
107
110{
111 operator=(other);
112
114 return *this;
115}
116
120
121double
122PeptideModel::getMz(unsigned int charge) const
123{
124 return ((getMass() + (pappso::MHPLUS * charge)) / (double)charge);
125}
126
127QString
129{
130 QString peptide_str;
131
132 if(m_beginMassDelta != 0.0)
133 peptide_str.append(QString("[%1]").arg(QString::number(m_beginMassDelta, 'f', 2)));
134
135 for(auto aa_model : *this)
136 {
137 qDebug() << " aa_model.amino_acid.toString()=" << aa_model.amino_acid.toAbsoluteString()
138 << " aa_model.alignment_type=" << Utils::toString(aa_model.alignment_type)
139 << " aa_model.mass_difference=" << aa_model.mass_difference
140 << " aa_model.bracket=" << aa_model.bracket;
141
142 if(aa_model.remove)
143 peptide_str.append("-(");
144 if(aa_model.bracket)
145 {
146 peptide_str.append(QString("[%1]").arg(aa_model.amino_acid.toString()));
147 }
148 else
149 {
150 peptide_str.append(aa_model.amino_acid.toString());
151 }
152
153
154 if(aa_model.mass_difference != 0.0)
155 {
156 peptide_str.append(
157 QString("[%1]").arg(QString::number(aa_model.mass_difference, 'f', 2)));
158 }
159
160 if(aa_model.remove)
161 peptide_str.append(")");
162 }
163
164 peptide_str.replace(")-(", "");
165 peptide_str.append(QString("_[%1]").arg(QString::number(getMassDelta(), 'f', 2)));
166 peptide_str.replace("_[0.00]", "");
167 peptide_str.replace("_[-0.00]", "");
168 return peptide_str;
169}
170
171
172bool
174{
175 for(auto aa_model : *this)
176 {
177 if(std::abs(aa_model.amino_acid.getMass() + aa_model.mass_difference) < 0.001)
178 return true;
179 }
180 return false;
181}
182
183bool
185{
186 AminoAcidModel *amino_acid_to_remove = nullptr;
187 int pos = -1;
188 for(auto aa_model : *this)
189 {
190 pos++;
191 if(std::abs(aa_model.amino_acid.getMass() + aa_model.mass_difference) < 0.001)
192 {
193 amino_acid_to_remove = &aa_model;
194 break;
195 }
196 }
197 if(amino_acid_to_remove != nullptr)
198 {
199 if(std::abs(front().amino_acid.getMass() - amino_acid_to_remove->amino_acid.getMass()) <
200 0.001)
201 {
202 erase(begin());
203 if(pos > 0)
204 at(pos - 1).mass_difference = 0;
205 return true;
206 }
207 }
208 return false;
209}
210
211
212QString
214{
215 QString peptide_str("[");
216
217 // if(m_beginMassDelta != 0.0)
218 // peptide_str.append(
219 // QString("[%1]").arg(QString::number(m_beginMassDelta, 'f', 2)));
220 // ProForma version 2 unexplained mass delta :
221 // peptide_str.append(
222 // QString("_[%1]").arg(QString::number(getMassDelta(), 'f', 2)));
223
224 if(getMassDelta() > 0)
225 {
226 peptide_str.append("+");
227 }
228 peptide_str.append(QString("%1]?").arg(QString::number(getMassDelta(), 'f', 4)));
229 peptide_str.replace("[+0.0000]?", "");
230 peptide_str.replace("[-0.0000]?", "");
231
232
233 double mass_diff = m_beginMassDelta;
234 for(auto aa_model : *this)
235 {
236 qDebug() << " aa_model.amino_acid.toString()=" << aa_model.amino_acid.toAbsoluteString()
237 << " aa_model.alignment_type=" << Utils::toString(aa_model.alignment_type)
238 << " aa_model.mass_difference=" << aa_model.mass_difference
239 << " aa_model.bracket=" << aa_model.bracket;
240
241 if(aa_model.bracket)
242 {
243 }
244
245 if(aa_model.remove)
246 {
247 peptide_str.append(aa_model.amino_acid.getLetter());
248
249 peptide_str.append(
250 "[" +
251 AaModification::getInstanceRemovalAccessionByAaLetter(aa_model.amino_acid.getLetter())
252 ->getAccession() +
253 "]");
254 }
255 else
256 {
257 peptide_str.append(aa_model.amino_acid.toProForma());
258
259 mass_diff += aa_model.mass_difference;
260 if(mass_diff != 0.0)
261 {
262 if(mass_diff > 0)
263 {
264 peptide_str.append(QString("[+%1]").arg(QString::number(mass_diff, 'f', 4)));
265 }
266 else
267 {
268 peptide_str.append(QString("[%1]").arg(QString::number(mass_diff, 'f', 4)));
269 }
270 }
271 }
272 mass_diff = 0.0;
273 }
274 return peptide_str;
275}
276double
278{
279 double mass = m_beginMassDelta;
280 if(m_cterModification != nullptr)
281 mass += m_cterModification->getMass();
282 if(m_nterModification != nullptr)
283 mass += m_nterModification->getMass();
284
285 for(auto aa_model : *this)
286 {
287 mass += aa_model.amino_acid.getMass() + aa_model.mass_difference;
288 }
289 return mass;
290}
291
292double
297
298std::size_t
300{
301 std::size_t count = 0;
302 if(m_beginMassDelta != 0.0)
303 count++;
304 for(auto aa_model : *this)
305 {
306 if(aa_model.mass_difference != 0.0)
307 count++;
308 }
309 return count;
310}
311
312void
314{
315 m_beginMassDelta = delta;
316}
317
318void
320{
321 if(m_theoreticalPeakList.size() == 0)
322 {
323 m_intensityExperimentalPeaks = mcsp_peakList.get()->totalIonCurrent();
324 generateTheoreticalPeaks(precision);
325 }
326 auto it_expe_peaks_end = mcsp_peakList.get()->end();
327 auto it_expe_peaks = mcsp_peakList.get()->begin();
328 auto it_theo_peaks = m_theoreticalPeakList.begin();
329 while((it_expe_peaks != mcsp_peakList.get()->end()) &&
330 (it_theo_peaks != m_theoreticalPeakList.end()))
331 {
332 while((it_expe_peaks != mcsp_peakList.get()->end()) &&
333 (it_expe_peaks->x < it_theo_peaks->mz_range.lower()))
334 { // find the first possible ion hit
335 it_expe_peaks++;
336 }
337 if(it_expe_peaks == mcsp_peakList.get()->end())
338 continue;
339
340 if(it_expe_peaks->x < it_theo_peaks->mz_range.upper())
341 {
342 // ok, we've got a hit
343 auto it_theo_peaks_loop = it_theo_peaks;
344 while((it_theo_peaks_loop != m_theoreticalPeakList.end()) &&
345 (it_theo_peaks_loop->mz_range.contains(it_expe_peaks->x)))
346 {
347 if((it_theo_peaks_loop->it_experimental_peak_match == it_expe_peaks_end) ||
348 (it_theo_peaks_loop->it_experimental_peak_match->y < it_expe_peaks->y))
349 {
350 it_theo_peaks_loop->it_experimental_peak_match = it_expe_peaks;
351 qDebug() << "match: mz=" << it_expe_peaks->x << " intensity=" << it_expe_peaks->y;
352 break;
353 }
354 it_theo_peaks_loop++;
355 }
356 it_expe_peaks++;
357 }
358 else
359 {
360 it_theo_peaks++;
361 }
362 // it_expe_peaks++;
363 }
364
365 // get number of shared peaks
368 std::vector<std::vector<pappso::DataPoint>::const_iterator> matched_experimental_peaks;
369 for(auto &theo_peak : m_theoreticalPeakList)
370 {
371 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
372 {
373 matched_experimental_peaks.push_back(theo_peak.it_experimental_peak_match);
374 // m_countSharedPeaks++;
375 }
376 }
377 auto it_end = std::unique(matched_experimental_peaks.begin(), matched_experimental_peaks.end());
378 m_countSharedPeaks = std::distance(matched_experimental_peaks.begin(), it_end);
379 m_intensitySharedPeaks = std::accumulate(
380 matched_experimental_peaks.begin(),
381 it_end,
382 0.0,
383 [](double k, const std::vector<pappso::DataPoint>::const_iterator &l) { return (k + l->y); });
384}
385
386void
388{
389 m_theoreticalPeakList.clear();
390 double cumul_mass =
392
393
394 auto it_expe_peaks_end = mcsp_peakList.get()->end();
395 std::size_t i = 0;
396 for(auto aa_model : *this)
397 {
398 // compute B ions
399 cumul_mass += aa_model.amino_acid.getMass() + aa_model.mass_difference;
400
401 qDebug() << cumul_mass;
402 m_theoreticalPeakList.push_back(
403 {pappso::MzRange(cumul_mass, precision), it_expe_peaks_end, i});
404 i++;
405 }
406 // remove the complete ion B (entire peptide, no fragment):
407 m_theoreticalPeakList.pop_back();
408
409 std::size_t bmaxindice = m_theoreticalPeakList.size();
411 cumul_mass += yion_delta + pappso::MHPLUS;
412 for(std::size_t i = 0; i < bmaxindice; i++)
413 {
414 m_theoreticalPeakList.push_back(
415 {pappso::MzRange(cumul_mass - m_theoreticalPeakList[i].mz_range.getMz(), precision),
416 it_expe_peaks_end,
417 i + 1});
418 qDebug() << m_theoreticalPeakList.back().mz_range.getMz();
419 }
420
421 std::sort(m_theoreticalPeakList.begin(),
424 return a.mz_range.getMz() < b.mz_range.getMz();
425 });
426}
427
428std::vector<double>
430{
431 std::vector<double> mass_list;
432 for(auto &datapoint : m_theoreticalPeakList)
433 {
434 mass_list.push_back(datapoint.mz_range.getMz());
435 }
436 return mass_list;
437}
438
439std::size_t
444
445double
450
451double
456
457void
459{
460 back().mass_difference = getMassDelta();
461}
462
463bool
465{
466 double precision_ref = precision->getNominal();
467 double offset = 0;
468 bool modified = false;
469 std::vector<AminoAcidModel>::iterator it_begin_block = end();
470 if(std::abs(m_beginMassDelta) > precision_ref)
471 {
472 it_begin_block = begin();
473 offset = m_beginMassDelta;
474
475 qDebug() << " new block offset=" << offset;
476 }
477 qDebug() << offset;
478 for(auto it = begin(); it != end(); it++)
479 {
480 qDebug() << " it->mass_difference=" << it->mass_difference;
481 if(it_begin_block == end())
482 {
483
484 if(std::abs(it->mass_difference) > precision_ref)
485 {
486 // new block
487 it_begin_block = it;
488 offset = it->mass_difference;
489 }
490 qDebug() << " new block offset=" << offset;
491 }
492 if(it_begin_block != end())
493 {
494 // existing block
495 qDebug() << " existing block offset=" << offset;
496 if(it == begin())
497 {
498 offset += it->mass_difference;
499 }
500 else
501 {
502 // where is the end of the block ?
503 qDebug() << " where is the end of the block ? offset=" << offset;
504 auto it_end_block =
505 std::find_if(it, end(), [offset, precision_ref](const AminoAcidModel &point) {
506 qDebug() << point.mass_difference << " " << offset + point.mass_difference;
507 if(std::abs(offset + point.mass_difference) <= precision_ref)
508 return true;
509 return false;
510 });
511
512 if(it_end_block != end())
513 {
514 // eliminate mass mass_difference
515 modified = true;
516 if(it_begin_block == begin())
518 it_begin_block->mass_difference = 0.0;
519 it_end_block->mass_difference = 0.0;
520 // start new block search
521 it_begin_block = end();
522 offset = 0;
523 qDebug() << " existing block end block found";
524 }
525 else
526 {
527 qDebug() << " existing block end block not found offset=" << offset;
528 // close block
529 it_begin_block = end();
530 offset = 0;
531 }
532 }
533 }
534 }
535 qDebug() << toString();
536 return modified;
537}
538
539
540bool
542{ // System.out.println("Elimination des neg offsets");
543 double precision_ref = precision->getNominal();
544 auto it_reverse = rbegin();
545 bool modified = false;
546
547 while(it_reverse != rend())
548 {
549 if(it_reverse->remove)
550 {
551 // this is a part of already removed block
552 }
553 else
554 {
555 double mass_difference = it_reverse->mass_difference;
556 if(mass_difference < 0)
557 {
558 // try to find an amino acid blocl of that mass
559 double cumul_mass_aa = 0;
560 auto it_block_end = it_reverse;
561 while(it_block_end != rend())
562 {
563 cumul_mass_aa += it_block_end->amino_acid.getMass();
564 it_block_end++;
565 if(std::abs(mass_difference + cumul_mass_aa) < precision_ref)
566 {
567 modified = true;
568 // block found -> remove this range
569 for(auto it_block = it_reverse; it_block != it_block_end; it_block++)
570 {
571 it_block->remove = true;
572 }
573 }
574 else
575 {
576 if((it_block_end != rend()) && (it_block_end->mass_difference != 0.0))
577 {
578 // interrupted block
579 break;
580 }
581 }
582 }
583 }
584 }
585 it_reverse++;
586 }
587
588 return modified;
589}
590
591bool
593{
594 if(m_theoreticalPeakList.size() == 0)
595 {
596 throw pappso::PappsoException("missing peak matching");
597 }
598 bool modified = false;
599 auto it_expe_peaks_end = mcsp_peakList.get()->end();
600 for(auto &theo_peak : m_theoreticalPeakList)
601 {
602 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
603 {
604 if(at(theo_peak.aa_indice).bracket == true)
605 {
606 modified = true;
607 at(theo_peak.aa_indice).bracket = false;
608 }
609 }
610 }
611 return modified;
612}
613
614const std::vector<TheoreticalPeakDataPoint> &
619
620QString
622{
623
624 auto it_expe_peaks_end = mcsp_peakList.get()->end();
625 QString str;
626 for(auto &theo_peak : m_theoreticalPeakList)
627 {
628 double intensity = 0;
629 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
630 {
631 intensity = theo_peak.it_experimental_peak_match->y;
632 }
633 str.append(QString("{%1,%2,%3,%4}")
634 .arg(theo_peak.mz_range.getMz())
635 .arg(intensity)
636 .arg(theo_peak.aa_indice)
637 .arg(at(theo_peak.aa_indice).amino_acid.toString()));
638 }
639 return str;
640}
641
642bool
643PeptideModel::checkForMutation(const pappso::Aa &amino_acid_candidate,
644 pappso::PrecisionPtr precision)
645{
646 bool modif = false;
647 double total_mass_to_insert = amino_acid_candidate.getMass();
648 auto insert_aa_modification =
650
651 double mass_difference = m_beginMassDelta;
652 for(auto &aa_model : *this)
653 {
654 mass_difference += aa_model.mass_difference;
655 auto aa_ref = aa_model.amino_acid;
656 if(mass_difference != 0.0)
657 {
658 mass_difference += aa_ref.getTotalModificationMass();
659 AaModificationP aa_ref_remove =
660 AaModification::getInstanceRemovalAccessionByAaLetter(aa_model.amino_acid.getLetter());
661 // check for possible mutation
662 double current_diff = (aa_ref_remove->getMass() - mass_difference) + total_mass_to_insert;
663
664
665 qDebug() << "current_diff=" << current_diff;
666 if(std::abs(current_diff) < precision->getNominal())
667 {
668 qDebug() << "modif = true=";
669 aa_model.mass_difference = 0;
670 aa_model.amino_acid.removeAllButInternalModification();
671 aa_model.amino_acid.addAaModification(aa_ref_remove);
672 aa_model.amino_acid.addAaModification(insert_aa_modification);
673 for(auto &mod : amino_acid_candidate.getModificationList())
674 {
675 aa_model.amino_acid.addAaModification(mod);
676 }
677 modif = true;
678 }
679 }
680 mass_difference = 0;
681 }
682 return modif;
683}
684
685bool
686PeptideModel::checkForMutations(const std::vector<Enums::AminoAcidChar> &aa_list,
687 pappso::PrecisionPtr precision)
688{
689 bool modif = false;
690 // AaModificationP carbamido = AaModification::getInstance("MOD:00397");
691 // AaModificationP metox = AaModification::getInstance("MOD:00719");
692
693 std::vector<AaModificationP> modificationInsertList;
694 for(const auto aa : aa_list)
695 {
696 modificationInsertList.push_back(
698 }
699 double mass_difference = m_beginMassDelta;
700 for(auto &aa_model : *this)
701 {
702 mass_difference += aa_model.mass_difference;
703 auto aa_ref = aa_model.amino_acid;
704 if(mass_difference != 0.0)
705 {
706 mass_difference += aa_ref.getTotalModificationMass();
707 AaModificationP aa_ref_remove =
708 AaModification::getInstanceRemovalAccessionByAaLetter(aa_model.amino_acid.getLetter());
709 AaModificationP aa_ref_insert = nullptr;
710 double better_diff = 10;
711 // check for possible mutation
712 for(const auto aaInsertion : modificationInsertList)
713 {
714 double current_diff =
715 (aa_ref_remove->getMass() - mass_difference) + aaInsertion->getMass();
716 qDebug() << aa_model.amino_acid.getLetter() << " " << aaInsertion->getName() << " "
717 << aaInsertion->getMass() << " " << current_diff;
718 if(std::abs(current_diff) < std::abs(better_diff))
719 {
720 aa_ref_insert = aaInsertion;
721 better_diff = current_diff;
722 }
723 }
724 qDebug() << "better_diff=" << better_diff;
725 if((aa_ref_insert != nullptr) && (std::abs(better_diff) < precision->getNominal()))
726 {
727
728 qDebug() << "modif = true=";
729 aa_model.mass_difference = 0;
730 aa_model.amino_acid.removeAllButInternalModification();
731 aa_model.amino_acid.addAaModification(aa_ref_remove);
732 aa_model.amino_acid.addAaModification(aa_ref_insert);
733 modif = true;
734 }
735 }
736 mass_difference = 0;
737 }
738 return modif;
739}
740
741bool
743 pappso::PrecisionPtr precision)
744{
745
746 bool modif = false;
747
748 double mass_difference = m_beginMassDelta;
749 for(auto &aa_model : *this)
750 {
751 mass_difference += aa_model.mass_difference;
752 auto aa_ref = aa_model.amino_acid;
753 if(mass_difference != 0.0)
754 {
755 if(std::abs(modification->getMass() - mass_difference) < precision->getNominal())
756 {
757 aa_model.mass_difference = 0;
758 aa_model.amino_acid.addAaModification(modification);
759 modif = true;
760 }
761 }
762 mass_difference = 0;
763 }
764 return modif;
765}
766
767
768bool
770{
771
772 bool modif = false;
773
774 double mass_difference = m_beginMassDelta;
775 for(auto &aa_model : *this)
776 {
777 mass_difference += aa_model.mass_difference;
778 auto aa_ref = aa_model.amino_acid;
779 if(aa_ref.getLetter() == aa_modified.getLetter())
780 {
781 if(mass_difference != 0.0)
782 {
783 double mass_modification = aa_modified.getTotalModificationMass();
784 if(std::abs(mass_modification - mass_difference) < precision->getNominal())
785 {
786 aa_model.mass_difference = 0;
787 for(auto &modification : aa_modified.getModificationList())
788 {
789 aa_model.amino_acid.addAaModification(modification);
790 }
791 modif = true;
792 }
793 }
794 }
795 mass_difference = 0;
796 }
797 return modif;
798}
799
800} // namespace specglob
801} // namespace pappso
virtual const char & getLetter() const
Definition aabase.cpp:403
pappso_double getMass() const
static AaModificationP getInstanceRemovalAccessionByAaLetter(const QChar &amino_acid)
get a PSI MOD instance corresponding to the removal of the given amino acid find the modifications th...
static AaModificationP getInstanceInsertionAccessionByAaLetter(const QChar &amino_acid)
get a PSI MOD instance corresponding to the insertion of the given amino acid find the modifications.
double getTotalModificationMass() const
get the sum of mass modifications
Definition aa.cpp:79
const std::vector< AaModificationP > & getModificationList() const
Definition aa.cpp:73
pappso_double getMass() const override
Definition aa.cpp:90
static pappso_double getDeltaMass(Enums::PeptideIon ion_type)
AaModificationP getCleavageCterModification() const
Definition peptide.cpp:590
AaModificationP getCleavageNterModification() const
Definition peptide.cpp:585
virtual pappso_double getNominal() const final
Definition precision.cpp:72
Class representing a fully specified mass spectrum.
MassSpectrumCstSPtr getMassSpectrumCstSPtr() const
Get the MassSpectrumCstSPtr.
double getPrecursorMass(bool *ok_p=nullptr) const
get precursor mass given the charge stats and precursor mz
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:517
pappso::AaModificationP m_nterModification
double getIntensityExperimentalPeaks() const
std::vector< TheoreticalPeakDataPoint > m_theoreticalPeakList
PeptideModel(const pappso::QualifiedMassSpectrum &qmass_spectrum, const pappso::Peptide &peptide)
std::size_t getCountSharedPeaks() const
void matchExperimentalPeaks(pappso::PrecisionPtr precision)
QString getTheoreticalPeakDataPointListToString() const
bool eliminateNegativeOffset(pappso::PrecisionPtr precision)
QString toProForma() const
get the peptide model in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README....
bool checkForAaModificationP(pappso::AaModificationP modification, pappso::PrecisionPtr precision)
try to replace mass differences with the given modification
pappso::AaModificationP m_cterModification
bool ltrimOnRemoval()
try to remove left amino acid if there is a removal
double getMassDelta() const
mass delta between experimental and theoretical mass
bool checkForMutations(const std::vector< Enums::AminoAcidChar > &aa_list, pappso::PrecisionPtr precision)
try to replace mass differences with corresponding mutations mass delta
PeptideModel & operator=(const PeptideModel &other)
pappso::MassSpectrumCstSPtr mcsp_peakList
const std::vector< TheoreticalPeakDataPoint > & getTheoreticalPeakDataPointList() const
pappso_double getMz(unsigned int charge) const
get the m/z peptide model mass
void generateTheoreticalPeaks(pappso::PrecisionPtr precision)
bool eliminateComplementaryDelta(pappso::PrecisionPtr precision)
bool checkForAaModification(const pappso::Aa &aa_modified, pappso::PrecisionPtr precision)
try to replace mass differences with the given modifications on a specific amino acid
bool checkForMutation(const pappso::Aa &amino_acid_candidate, pappso::PrecisionPtr precision)
try to replace mass differences with corresponding mutation mass delta
std::vector< double > getTheoreticalIonMassList() const
PeptideModel & copyDeep(const PeptideModel &other)
@ y
Cter amino ions.
Definition types.h:295
@ nonAlign
the type of alignment to put in origin matrix NON Alignment (0 - NA)
Definition types.h:49
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
const AaModification * AaModificationP
const pappso_double MHPLUS(1.007276466879)
const pappso_double MPROTIUM(1.007825032241)
const PrecisionBase * PrecisionPtr
Definition precision.h:122