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"
39#include "../../peptide/peptiderawfragmentmasses.h"
40#include "../../pappsoexception.h"
41#include "../../utils.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 aa_pep.removeInternalCterModification();
64 aa_pep.removeInternalNterModification();
65
66 push_back({aa_pep, SpectralAlignmentType::nonAlign, false, 0.0});
67 }
68
69 // internal:Nter_hydrolytic_cleavage_H
70
71 // internal:Cter_hydrolytic_cleavage_HO
72 //
73}
74
90
110
113{
114 operator=(other);
115
117 return *this;
118}
119
123
124double
125PeptideModel::getMz(unsigned int charge) const
126{
127 return ((getMass() + (pappso::MHPLUS * charge)) / (double)charge);
128}
129
130QString
132{
133 QString peptide_str;
134
135 if(m_beginMassDelta != 0.0)
136 peptide_str.append(
137 QString("[%1]").arg(QString::number(m_beginMassDelta, 'f', 2)));
138
139 for(auto aa_model : *this)
140 {
141 qDebug() << " aa_model.amino_acid.toString()="
142 << aa_model.amino_acid.toAbsoluteString()
143 << " aa_model.alignment_type="
144 << Utils::toString(aa_model.alignment_type)
145 << " aa_model.mass_difference=" << aa_model.mass_difference
146 << " aa_model.bracket=" << aa_model.bracket;
147
148 if(aa_model.remove)
149 peptide_str.append("-(");
150 if(aa_model.bracket)
151 {
152 peptide_str.append(
153 QString("[%1]").arg(aa_model.amino_acid.toString()));
154 }
155 else
156 {
157 peptide_str.append(aa_model.amino_acid.toString());
158 }
159
160
161 if(aa_model.mass_difference != 0.0)
162 {
163 peptide_str.append(QString("[%1]").arg(
164 QString::number(aa_model.mass_difference, 'f', 2)));
165 }
166
167 if(aa_model.remove)
168 peptide_str.append(")");
169 }
170
171 peptide_str.replace(")-(", "");
172 peptide_str.append(
173 QString("_[%1]").arg(QString::number(getMassDelta(), 'f', 2)));
174 peptide_str.replace("_[0.00]", "");
175 peptide_str.replace("_[-0.00]", "");
176 return peptide_str;
177}
178
179
180bool
182{
183 for(auto aa_model : *this)
184 {
185 if(std::abs(aa_model.amino_acid.getMass() + aa_model.mass_difference) <
186 0.001)
187 return true;
188 }
189 return false;
190}
191
192bool
194{
195 AminoAcidModel *amino_acid_to_remove = nullptr;
196 int pos = -1;
197 for(auto aa_model : *this)
198 {
199 pos++;
200 if(std::abs(aa_model.amino_acid.getMass() + aa_model.mass_difference) <
201 0.001)
202 {
203 amino_acid_to_remove = &aa_model;
204 break;
205 }
206 }
207 if(amino_acid_to_remove != nullptr)
208 {
209 if(std::abs(front().amino_acid.getMass() -
210 amino_acid_to_remove->amino_acid.getMass()) < 0.001)
211 {
212 erase(begin());
213 if(pos > 0)
214 at(pos - 1).mass_difference = 0;
215 return true;
216 }
217 }
218 return false;
219}
220
221QString
223{
224 QString peptide_str;
225
226 // if(m_beginMassDelta != 0.0)
227 // peptide_str.append(
228 // QString("[%1]").arg(QString::number(m_beginMassDelta, 'f', 2)));
229
230 double mass_diff = m_beginMassDelta;
231 for(auto aa_model : *this)
232 {
233 qDebug() << " aa_model.amino_acid.toString()="
234 << aa_model.amino_acid.toAbsoluteString()
235 << " aa_model.alignment_type="
236 << Utils::toString(aa_model.alignment_type)
237 << " aa_model.mass_difference=" << aa_model.mass_difference
238 << " aa_model.bracket=" << aa_model.bracket;
239
240 if(aa_model.bracket)
241 {
242 }
243
244 if(aa_model.remove)
245 {
246 peptide_str.append(aa_model.amino_acid.getLetter());
247
248 peptide_str.append(
249 "[" +
251 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(
265 QString("[+%1]").arg(QString::number(mass_diff, 'f', 4)));
266 }
267 else
268 {
269 peptide_str.append(
270 QString("[%1]").arg(QString::number(mass_diff, 'f', 4)));
271 }
272 }
273 }
274 mass_diff = 0.0;
275 }
276 return peptide_str;
277}
278double
280{
281 double mass = m_beginMassDelta;
282 if(m_cterModification != nullptr)
283 mass += m_cterModification->getMass();
284 if(m_nterModification != nullptr)
285 mass += m_nterModification->getMass();
286
287 for(auto aa_model : *this)
288 {
289 mass += aa_model.amino_acid.getMass() + aa_model.mass_difference;
290 }
291 return mass;
292}
293
294double
299
300std::size_t
302{
303 std::size_t count = 0;
304 if(m_beginMassDelta != 0.0)
305 count++;
306 for(auto aa_model : *this)
307 {
308 if(aa_model.mass_difference != 0.0)
309 count++;
310 }
311 return count;
312}
313
314void
316{
317 m_beginMassDelta = delta;
318}
319
320void
322{
323 if(m_theoreticalPeakList.size() == 0)
324 {
325 m_intensityExperimentalPeaks = mcsp_peakList.get()->totalIonCurrent();
326 generateTheoreticalPeaks(precision);
327 }
328 auto it_expe_peaks_end = mcsp_peakList.get()->end();
329 auto it_expe_peaks = mcsp_peakList.get()->begin();
330 auto it_theo_peaks = m_theoreticalPeakList.begin();
331 while((it_expe_peaks != mcsp_peakList.get()->end()) &&
332 (it_theo_peaks != m_theoreticalPeakList.end()))
333 {
334 while((it_expe_peaks != mcsp_peakList.get()->end()) &&
335 (it_expe_peaks->x < it_theo_peaks->mz_range.lower()))
336 { // find the first possible ion hit
337 it_expe_peaks++;
338 }
339 if(it_expe_peaks == mcsp_peakList.get()->end())
340 continue;
341
342 if(it_expe_peaks->x < it_theo_peaks->mz_range.upper())
343 {
344 // ok, we've got a hit
345 auto it_theo_peaks_loop = it_theo_peaks;
346 while((it_theo_peaks_loop != m_theoreticalPeakList.end()) &&
347 (it_theo_peaks_loop->mz_range.contains(it_expe_peaks->x)))
348 {
349 if((it_theo_peaks_loop->it_experimental_peak_match ==
350 it_expe_peaks_end) ||
351 (it_theo_peaks_loop->it_experimental_peak_match->y <
352 it_expe_peaks->y))
353 {
354 it_theo_peaks_loop->it_experimental_peak_match =
355 it_expe_peaks;
356 qDebug() << "match: mz=" << it_expe_peaks->x
357 << " intensity=" << it_expe_peaks->y;
358 break;
359 }
360 it_theo_peaks_loop++;
361 }
362 it_expe_peaks++;
363 }
364 else
365 {
366 it_theo_peaks++;
367 }
368 // it_expe_peaks++;
369 }
370
371 // get number of shared peaks
374 std::vector<std::vector<pappso::DataPoint>::const_iterator>
375 matched_experimental_peaks;
376 for(auto &theo_peak : m_theoreticalPeakList)
377 {
378 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
379 {
380 matched_experimental_peaks.push_back(
381 theo_peak.it_experimental_peak_match);
382 // m_countSharedPeaks++;
383 }
384 }
385 auto it_end = std::unique(matched_experimental_peaks.begin(),
386 matched_experimental_peaks.end());
388 std::distance(matched_experimental_peaks.begin(), it_end);
389 m_intensitySharedPeaks = std::accumulate(
390 matched_experimental_peaks.begin(),
391 it_end,
392 0.0,
393 [](double k, const std::vector<pappso::DataPoint>::const_iterator &l) {
394 return (k + l->y);
395 });
396}
397
398void
400{
401 m_theoreticalPeakList.clear();
402 double cumul_mass = m_beginMassDelta + m_nterModification->getMass() -
404
405
406 auto it_expe_peaks_end = mcsp_peakList.get()->end();
407 std::size_t i = 0;
408 for(auto aa_model : *this)
409 {
410 // compute B ions
411 cumul_mass += aa_model.amino_acid.getMass() + aa_model.mass_difference;
412
413 qDebug() << cumul_mass;
414 m_theoreticalPeakList.push_back(
415 {pappso::MzRange(cumul_mass, precision), it_expe_peaks_end, i});
416 i++;
417 }
418 // remove the complete ion B (entire peptide, no fragment):
419 m_theoreticalPeakList.pop_back();
420
421 std::size_t bmaxindice = m_theoreticalPeakList.size();
422 double yion_delta =
424 cumul_mass += yion_delta + pappso::MHPLUS;
425 for(std::size_t i = 0; i < bmaxindice; i++)
426 {
427 m_theoreticalPeakList.push_back(
428 {pappso::MzRange(cumul_mass - m_theoreticalPeakList[i].mz_range.getMz(),
429 precision),
430 it_expe_peaks_end,
431 i + 1});
432 qDebug() << m_theoreticalPeakList.back().mz_range.getMz();
433 }
434
435 std::sort(
436 m_theoreticalPeakList.begin(),
439 return a.mz_range.getMz() < b.mz_range.getMz();
440 });
441}
442
443std::vector<double>
445{
446 std::vector<double> mass_list;
447 for(auto &datapoint : m_theoreticalPeakList)
448 {
449 mass_list.push_back(datapoint.mz_range.getMz());
450 }
451 return mass_list;
452}
453
454std::size_t
459
460double
465
466double
471
472void
474{
475 back().mass_difference = getMassDelta();
476}
477
478bool
480{
481 double precision_ref = precision->getNominal();
482 double offset = 0;
483 bool modified = false;
484 std::vector<AminoAcidModel>::iterator it_begin_block = end();
485 if(std::abs(m_beginMassDelta) > precision_ref)
486 {
487 it_begin_block = begin();
488 offset = m_beginMassDelta;
489
490 qDebug() << " new block offset=" << offset;
491 }
492 qDebug() << offset;
493 for(auto it = begin(); it != end(); it++)
494 {
495 qDebug() << " it->mass_difference=" << it->mass_difference;
496 if(it_begin_block == end())
497 {
498
499 if(std::abs(it->mass_difference) > precision_ref)
500 {
501 // new block
502 it_begin_block = it;
503 offset = it->mass_difference;
504 }
505 qDebug() << " new block offset=" << offset;
506 }
507 if(it_begin_block != end())
508 {
509 // existing block
510 qDebug() << " existing block offset=" << offset;
511 if(it == begin())
512 {
513 offset += it->mass_difference;
514 }
515 else
516 {
517 // where is the end of the block ?
518 qDebug() << " where is the end of the block ? offset=" << offset;
519 auto it_end_block = std::find_if(
520 it,
521 end(),
522 [offset, precision_ref](const AminoAcidModel &point) {
523 qDebug() << point.mass_difference << " "
524 << offset + point.mass_difference;
525 if(std::abs(offset + point.mass_difference) <= precision_ref)
526 return true;
527 return false;
528 });
529
530 if(it_end_block != end())
531 {
532 // eliminate mass mass_difference
533 modified = true;
534 if(it_begin_block == begin())
536 it_begin_block->mass_difference = 0.0;
537 it_end_block->mass_difference = 0.0;
538 // start new block search
539 it_begin_block = end();
540 offset = 0;
541 qDebug() << " existing block end block found";
542 }
543 else
544 {
545 qDebug() << " existing block end block not found offset="
546 << offset;
547 // close block
548 it_begin_block = end();
549 offset = 0;
550 }
551 }
552 }
553 }
554 qDebug() << toString();
555 return modified;
556}
557
558
559bool
561{ // System.out.println("Elimination des neg offsets");
562 double precision_ref = precision->getNominal();
563 auto it_reverse = rbegin();
564 bool modified = false;
565
566 while(it_reverse != rend())
567 {
568 if(it_reverse->remove)
569 {
570 // this is a part of already removed block
571 }
572 else
573 {
574 double mass_difference = it_reverse->mass_difference;
575 if(mass_difference < 0)
576 {
577 // try to find an amino acid blocl of that mass
578 double cumul_mass_aa = 0;
579 auto it_block_end = it_reverse;
580 while(it_block_end != rend())
581 {
582 cumul_mass_aa += it_block_end->amino_acid.getMass();
583 it_block_end++;
584 if(std::abs(mass_difference + cumul_mass_aa) < precision_ref)
585 {
586 modified = true;
587 // block found -> remove this range
588 for(auto it_block = it_reverse; it_block != it_block_end;
589 it_block++)
590 {
591 it_block->remove = true;
592 }
593 }
594 else
595 {
596 if((it_block_end != rend()) &&
597 (it_block_end->mass_difference != 0.0))
598 {
599 // interrupted block
600 break;
601 }
602 }
603 }
604 }
605 }
606 it_reverse++;
607 }
608
609 return modified;
610}
611
612bool
614{
615 if(m_theoreticalPeakList.size() == 0)
616 {
617 throw pappso::PappsoException("missing peak matching");
618 }
619 bool modified = false;
620 auto it_expe_peaks_end = mcsp_peakList.get()->end();
621 for(auto &theo_peak : m_theoreticalPeakList)
622 {
623 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
624 {
625 if(at(theo_peak.aa_indice).bracket == true)
626 {
627 modified = true;
628 at(theo_peak.aa_indice).bracket = false;
629 }
630 }
631 }
632 return modified;
633}
634
635const std::vector<TheoreticalPeakDataPoint> &
640
641QString
643{
644
645 auto it_expe_peaks_end = mcsp_peakList.get()->end();
646 QString str;
647 for(auto &theo_peak : m_theoreticalPeakList)
648 {
649 double intensity = 0;
650 if(theo_peak.it_experimental_peak_match != it_expe_peaks_end)
651 {
652 intensity = theo_peak.it_experimental_peak_match->y;
653 }
654 str.append(QString("{%1,%2,%3,%4}")
655 .arg(theo_peak.mz_range.getMz())
656 .arg(intensity)
657 .arg(theo_peak.aa_indice)
658 .arg(at(theo_peak.aa_indice).amino_acid.toString()));
659 }
660 return str;
661}
662
663bool
664PeptideModel::checkForMutation(const pappso::Aa &amino_acid_candidate,
665 pappso::PrecisionPtr precision)
666{
667 bool modif = false;
668 double total_mass_to_insert = amino_acid_candidate.getMass();
669 auto insert_aa_modification =
671 amino_acid_candidate.getLetter());
672
673 double mass_difference = m_beginMassDelta;
674 for(auto &aa_model : *this)
675 {
676 mass_difference += aa_model.mass_difference;
677 auto aa_ref = aa_model.amino_acid;
678 if(mass_difference != 0.0)
679 {
680 mass_difference += aa_ref.getTotalModificationMass();
681 AaModificationP aa_ref_remove =
683 aa_model.amino_acid.getLetter());
684 // check for possible mutation
685 double current_diff =
686 (aa_ref_remove->getMass() - mass_difference) + total_mass_to_insert;
687
688
689 qDebug() << "current_diff=" << current_diff;
690 if(std::abs(current_diff) < precision->getNominal())
691 {
692 qDebug() << "modif = true=";
693 aa_model.mass_difference = 0;
694 aa_model.amino_acid.removeAllButInternalModification();
695 aa_model.amino_acid.addAaModification(aa_ref_remove);
696 aa_model.amino_acid.addAaModification(insert_aa_modification);
697 for(auto &mod : amino_acid_candidate.getModificationList())
698 {
699 aa_model.amino_acid.addAaModification(mod);
700 }
701 modif = true;
702 }
703 }
704 mass_difference = 0;
705 }
706 return modif;
707}
708
709bool
710PeptideModel::checkForMutations(const std::vector<AminoAcidChar> &aa_list,
711 pappso::PrecisionPtr precision)
712{
713 bool modif = false;
714 // AaModificationP carbamido = AaModification::getInstance("MOD:00397");
715 // AaModificationP metox = AaModification::getInstance("MOD:00719");
716
717 std::vector<AaModificationP> modificationInsertList;
718 for(const auto aa : aa_list)
719 {
720 modificationInsertList.push_back(
722 }
723 double mass_difference = m_beginMassDelta;
724 for(auto &aa_model : *this)
725 {
726 mass_difference += aa_model.mass_difference;
727 auto aa_ref = aa_model.amino_acid;
728 if(mass_difference != 0.0)
729 {
730 mass_difference += aa_ref.getTotalModificationMass();
731 AaModificationP aa_ref_remove =
733 aa_model.amino_acid.getLetter());
734 AaModificationP aa_ref_insert = nullptr;
735 double better_diff = 10;
736 // check for possible mutation
737 for(const auto aaInsertion : modificationInsertList)
738 {
739 double current_diff =
740 (aa_ref_remove->getMass() - mass_difference) +
741 aaInsertion->getMass();
742 qDebug() << aa_model.amino_acid.getLetter() << " "
743 << aaInsertion->getName() << " "
744 << aaInsertion->getMass() << " " << current_diff;
745 if(std::abs(current_diff) < std::abs(better_diff))
746 {
747 aa_ref_insert = aaInsertion;
748 better_diff = current_diff;
749 }
750 }
751 qDebug() << "better_diff=" << better_diff;
752 if((aa_ref_insert != nullptr) &&
753 (std::abs(better_diff) < precision->getNominal()))
754 {
755
756 qDebug() << "modif = true=";
757 aa_model.mass_difference = 0;
758 aa_model.amino_acid.removeAllButInternalModification();
759 aa_model.amino_acid.addAaModification(aa_ref_remove);
760 aa_model.amino_acid.addAaModification(aa_ref_insert);
761 modif = true;
762 }
763 }
764 mass_difference = 0;
765 }
766 return modif;
767}
768
769bool
771 pappso::PrecisionPtr precision)
772{
773
774 bool modif = false;
775
776 double mass_difference = m_beginMassDelta;
777 for(auto &aa_model : *this)
778 {
779 mass_difference += aa_model.mass_difference;
780 auto aa_ref = aa_model.amino_acid;
781 if(mass_difference != 0.0)
782 {
783 if(std::abs(modification->getMass() - mass_difference) <
784 precision->getNominal())
785 {
786 aa_model.mass_difference = 0;
787 aa_model.amino_acid.addAaModification(modification);
788 modif = true;
789 }
790 }
791 mass_difference = 0;
792 }
793 return modif;
794}
795
796
797bool
799 pappso::PrecisionPtr precision)
800{
801
802 bool modif = false;
803
804 double mass_difference = m_beginMassDelta;
805 for(auto &aa_model : *this)
806 {
807 mass_difference += aa_model.mass_difference;
808 auto aa_ref = aa_model.amino_acid;
809 if(aa_ref.getLetter() == aa_modified.getLetter())
810 {
811 if(mass_difference != 0.0)
812 {
813 double mass_modification = aa_modified.getTotalModificationMass();
814 if(std::abs(mass_modification - mass_difference) <
815 precision->getNominal())
816 {
817 aa_model.mass_difference = 0;
818 for(auto &modification : aa_modified.getModificationList())
819 {
820 aa_model.amino_acid.addAaModification(modification);
821 }
822 modif = true;
823 }
824 }
825 }
826 mass_difference = 0;
827 }
828 return modif;
829}
830
831} // namespace specglob
832} // namespace pappso
virtual const char & getLetter() const
Definition aabase.cpp:433
const QString & getAccession() const
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(PeptideIon ion_type)
AaModificationP getInternalNterModification() const
Definition peptide.cpp:467
AaModificationP getInternalCterModification() const
Definition peptide.cpp:478
virtual pappso_double getNominal() const final
Definition precision.cpp:65
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:535
pappso::AaModificationP m_nterModification
double getIntensityExperimentalPeaks() const
std::vector< TheoreticalPeakDataPoint > m_theoreticalPeakList
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
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 checkForMutations(const std::vector< AminoAcidChar > &aa_list, pappso::PrecisionPtr precision)
try to replace mass differences with corresponding mutations mass delta
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)
@ nonAlign
the type of alignment to put in origin matrix NON Alignment (0 - NA)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
@ y
Cter amino ions.
const pappso_double MHPLUS(1.007276466879)
const pappso_double MPROTIUM(1.007825032241)
SpecGlobTool peptide model.