libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
utils.cpp
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3 *
4 * This file is part of the PAPPSOms++ library.
5 *
6 * PAPPSOms++ is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * PAPPSOms++ is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Contributors:
20 * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21 *implementation
22 ******************************************************************************/
23
24/////////////////////// StdLib includes
25#include <cmath>
26#include <iomanip>
27
28
29/////////////////////// Qt includes
30#include <QDebug>
31#include <QFile>
32#include <QTextStream>
33
34
35/////////////////////// Local includes
36#include "pappsomspp/config.h"
37#include "utils.h"
38#include "types.h"
40#include "trace/trace.h"
41
42
43namespace pappso
44{
45
46// Matches a double (decimal value, that is, m/z
47// value)
49 QRegularExpression("\\d*\\.?\\d+");
50
51// Matches anything that is not digit, '.', or '-'
52// (that is, matches a separator
53QRegularExpression Utils::anythingButDigitDotDash = QRegularExpression("[^\\d^\\.^-]+");
54
55// Matches a double (with exp notation
56// possibly) and also potentially a '-' sign. This is the intensity.
58 QRegularExpression("-?\\d*\\.?\\d*[e-]?\\d*");
59
60// Matches <number><separator><number>, that is: m/z<separator>intensity.
61QRegularExpression Utils::xyMassDataFormatRegExp =
62 // QRegularExpression("^(\\d*\\.?\\d+)([^\\d^\\.^-]+)(-?\\d*\\.?\\d*[e-]?\\d*)");
63 QRegularExpression(QString("^(%1)(%2)(%3)")
65 .arg(Utils::anythingButDigitDotDash.pattern())
67
68
69QRegularExpression Utils::endOfLineRegExp = QRegularExpression("^\\s+$");
70
71const QString
73{
74 int size = log10(num);
75 size += 97;
76 QLatin1Char latin1_char(size);
77 QString base(latin1_char);
78 base.append(QString().setNum(num));
79 return (base);
80}
81
82
83void
84Utils::writeLexicalOrderedString(QTextStream *p_out, unsigned int num)
85{
86 *p_out << (char)(log10(num) + 97) << num;
87}
88
89
90//! Determine the number of zero decimals between the decimal point and the
91//! first non-zero decimal.
92/*!
93 * 0.11 would return 0 (no empty decimal)
94 * 2.001 would return 2
95 * 1000.0001254 would return 3
96 *
97 * \param value the value to be analyzed
98 * \return the number of '0' decimals between the decimal separator '.' and
99 * the first non-0 decimal
100 */
101int
103{
104 // qDebug() << qSetRealNumberPrecision(10) << "Double value: " << value;
105
106 int intPart = static_cast<int>(value);
107
108 // qDebug() << "int part:" << intPart;
109
110 double decimalPart = value - intPart;
111
112 // qDebug() << qSetRealNumberPrecision(10) << "decimal part: " << decimalPart;
113
114 int count = 0;
115
116 while(decimalPart > 0)
117 {
118 ++count;
119
120 decimalPart *= 10;
121
122 // qDebug() << "Iteration " << count << "decimal part:" << decimalPart;
123
124 if(decimalPart >= 1)
125 {
126 // qDebug() << "Because decimal part " << decimalPart
127 //<< "is >= 1, breaking loop while count is " << count << ".";
128
129 break;
130 }
131 }
132
133 // qDebug() << "Returning count:" << count - 1;
134
135 return count - 1;
136}
137
138
140Utils::roundToDecimals(pappso_double value, int decimal_places)
141{
142 if(decimal_places < 0)
143 return value;
144
145 return ceil((value * pow(10, decimal_places)) - 0.49) / pow(10, decimal_places);
146}
147
148
149long long int
151{
152 pappso::pappso_double test_decimal = 100000000000;
153 if(sizeof(int *) == 4)
154 { // 32bits
155 test_decimal = 100000000;
156 }
157 return (floor(input * test_decimal));
158}
159
160
161std::string
162Utils::toUtf8StandardString(const QString &text)
163{
164 std::string env_backup;
165 try
166 {
167#ifdef MXE
168 // std::locale::global(std::locale("C")); // set locale to default locale
169 env_backup = std::setlocale(LC_ALL, nullptr);
170 std::setlocale(LC_ALL, "C");
171#else
172 std::locale::global(std::locale("C")); // set locale to default locale
173#endif
174 }
175 catch(std::exception &error)
176 {
178 QObject::tr("Error trying to set local to C : %1").arg(error.what()));
179 }
180 // Now perform the conversion.
181 QByteArray byte_array = text.toUtf8();
182 std::string stdText = "";
183
184 for(char c : byte_array)
185 {
186 stdText += c;
187 }
188
189 try
190 {
191#ifdef MXE
192 // std::locale::global(std::locale("C")); // set locale to default locale
193 std::setlocale(LC_ALL, env_backup.c_str());
194#else // Set back the locale to the backed-up one.
195 std::locale::global(std::locale("")); // sets locale according to OS environment
196#endif
197 }
198 catch(std::exception &error)
199 {
200
202 QObject::tr("Error trying to set local to original system one %1 : %2")
203 .arg(env_backup.c_str())
204 .arg(error.what()));
205 }
206
207 return stdText;
208}
209
210
211bool
212Utils::writeToFile(const QString &text, const QString &file_name)
213{
214
215 QFile file(file_name);
216
217 if(file.open(QFile::WriteOnly | QFile::Truncate))
218 {
219
220 QTextStream out(&file);
221
222 out << text;
223
224 out.flush();
225 file.close();
226
227 return true;
228 }
229
230 return false;
231}
232
233
234bool
235Utils::appendToFile(const QString &text, const QString &file_name)
236{
237
238 QFile file(file_name);
239
240 if(file.open(QFile::WriteOnly | QFile::Append))
241 {
242
243 QTextStream out(&file);
244
245 out << text;
246
247 out.flush();
248 file.close();
249
250 return true;
251 }
252
253 return false;
254}
255
256
257std::size_t
258Utils::extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
259{
260 qDebug() << " " << spectrum_native_id;
261 QStringList native_id_list = spectrum_native_id.split("=");
262 if(native_id_list.size() < 2)
263 {
264 throw ExceptionNotFound(
265 QObject::tr("scan number not found in mzML native id %1").arg(spectrum_native_id));
266 }
267 else
268 {
269 /** TODO activate this in a future release to ensure scan number
270 for(auto i = 0; i < native_id_list.size(); i += 2)
271 {
272 if(native_id_list[i] == "scan")
273 {
274 return native_id_list[i + 1].toULong();
275 }
276 }
277
278 throw ExceptionNotFound(
279 QObject::tr("scan number not found in mzML native id %1")
280 .arg(spectrum_native_id));
281
282*/
283 return native_id_list.back().toULong();
284 }
285 return 0;
286}
287
288
289QString
290Utils::pointerToString(const void *const pointer)
291{
292 return QString("%1").arg((quintptr)pointer, QT_POINTER_SIZE * 2, 16, QChar('0'));
293}
294
295
296//! Tell if both double values, are equal within the double representation
297//! capabilities of the platform.
298bool
299Utils::almostEqual(double value1, double value2, int decimalPlaces)
300{
301 // QString value1String = QString("%1").arg(value1,
302 // 0, 'f', 60);
303 // QString value2String = QString("%1").arg(value2,
304 // 0, 'f', 60);
305
306 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
307 //<< "value1:" << value1String << "value2:" << value2String;
308
309 // The machine epsilon has to be scaled to the magnitude of the values used
310 // and multiplied by the desired precision in ULPs (units in the last place)
311 // (decimal places).
312
313 double valueSum = std::abs(value1 + value2);
314 // QString valueSumString = QString("%1").arg(valueSum,
315 // 0, 'f', 60);
316
317 double valueDiff = std::abs(value1 - value2);
318 // QString valueDiffString = QString("%1").arg(valueDiff,
319 // 0, 'f', 60);
320
321 double epsilon = std::numeric_limits<double>::epsilon();
322 // QString epsilonString = QString("%1").arg(epsilon,
323 // 0, 'f', 60);
324
325 double scaleFactor = epsilon * valueSum * decimalPlaces;
326 // QString scaleFactorString = QString("%1").arg(scaleFactor,
327 // 0, 'f', 60);
328
329 // qWarning() << "valueDiff:" << valueDiffString << "valueSum:" <<
330 // valueSumString <<
331 //"epsilon:" << epsilonString << "scaleFactor:" << scaleFactorString;
332
333 bool res = valueDiff < scaleFactor
334 // unless the result is subnormal:
335 || valueDiff < std::numeric_limits<double>::min();
336
337 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
338 //<< "returning res:" << res;
339
340 return res;
341}
342
343
344double
346{
347 return std::nextafter(value, value + 1);
348}
349
350
351QString
353 std::chrono::system_clock::time_point chrono_time)
354{
355
356 time_t tt;
357
358 tt = std::chrono::system_clock::to_time_t(chrono_time);
359
360 QString debug_text = QString("%1 - %2\n").arg(msg).arg(QString::fromLatin1(ctime(&tt)));
361
362 return debug_text;
363}
364
365
366QString
368 std::chrono::system_clock::time_point chrono_start,
369 std::chrono::system_clock::time_point chrono_finish)
370{
371 QString debug_text =
372 QString(
373 "%1 %2 min = %3 s = %4 ms = %5 "
374 "µs\n")
375 .arg(msg)
376 .arg(std::chrono::duration_cast<std::chrono::minutes>(chrono_finish - chrono_start).count())
377 .arg(std::chrono::duration_cast<std::chrono::seconds>(chrono_finish - chrono_start).count())
378 .arg(
379 std::chrono::duration_cast<std::chrono::milliseconds>(chrono_finish - chrono_start).count())
380 .arg(std::chrono::duration_cast<std::chrono::microseconds>(chrono_finish - chrono_start)
381 .count());
382
383 return debug_text;
384}
385
386
387std::vector<double>
388Utils::splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
389{
390
391 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
392
393 // qDebug() << "string list:" << string_list;
394
395 std::vector<double> double_vector;
396
397 for(int iter = 0; iter < string_list.size(); ++iter)
398 {
399 QString current_string = string_list.at(iter);
400
401 bool ok = false;
402
403 double current_double = current_string.toDouble(&ok);
404
405 if(!current_double && !ok)
406 {
407 ++error_count;
408 continue;
409 }
410
411 double_vector.push_back(current_double);
412 }
413
414 return double_vector;
415}
416
417
418std::vector<std::size_t>
419Utils::splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
420{
421 // qDebug() << "Parsing text:" << text;
422
423 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
424
425 // qDebug() << "string list size:" << string_list.size()
426 //<< "values:" << string_list;
427
428 std::vector<std::size_t> sizet_vector;
429
430 for(int iter = 0; iter < string_list.size(); ++iter)
431 {
432 QString current_string = string_list.at(iter);
433
434 bool ok = false;
435
436 std::size_t current_sizet = current_string.toUInt(&ok);
437
438 if(!current_sizet && !ok)
439 {
440 ++error_count;
441 continue;
442 }
443
444 sizet_vector.push_back(current_sizet);
445 }
446
447 return sizet_vector;
448}
449QString
451{
452 if(value)
453 return "TRUE";
454 return "FALSE";
455}
456
457QString
459{
460
461 if(mz_format == Enums::MsDataFormat::mzML)
462 return "mzML";
463 else if(mz_format == Enums::MsDataFormat::mzXML)
464 return "mzXML";
465 else if(mz_format == Enums::MsDataFormat::MGF)
466 return "MGF";
467 else if(mz_format == Enums::MsDataFormat::SQLite3)
468 return "SQLite3";
469 else if(mz_format == Enums::MsDataFormat::xy)
470 return "xy";
471 else if(mz_format == Enums::MsDataFormat::mz5)
472 return "mz5";
473 else if(mz_format == Enums::MsDataFormat::msn)
474 return "msn";
475 else if(mz_format == Enums::MsDataFormat::abSciexWiff)
476 return "abSciexWiff";
477 else if(mz_format == Enums::MsDataFormat::abSciexT2D)
478 return "abSciexT2D";
479 else if(mz_format == Enums::MsDataFormat::agilentMassHunter)
480 return "agilentMassHunter";
481 else if(mz_format == Enums::MsDataFormat::thermoRaw)
482 return "thermoRaw";
483 else if(mz_format == Enums::MsDataFormat::watersRaw)
484 return "watersRaw";
485 else if(mz_format == Enums::MsDataFormat::brukerFid)
486 return "brukerFid";
487 else if(mz_format == Enums::MsDataFormat::brukerYep)
488 return "brukerYep";
489 else if(mz_format == Enums::MsDataFormat::brukerBaf)
490 return "brukerBaf";
491 else if(mz_format == Enums::MsDataFormat::brukerTims)
492 return "brukerTims";
493 else if(mz_format == Enums::MsDataFormat::brukerBafAscii)
494 return "brukerBafAscii";
495 else
496 return "unknown";
497}
498
499
500QString
502{
503
504 if(file_reader_type == Enums::FileReaderType::pwiz)
505 return "pwiz";
506 else if(file_reader_type == Enums::FileReaderType::xy)
507 return "xy";
508 else if(file_reader_type == Enums::FileReaderType::tims)
509 return "tims";
510 else if(file_reader_type == Enums::FileReaderType::tims_frames)
511 return "tims_frames";
512 else
513 return "unknown";
514}
515
516QString
518{
519 switch(type)
520 {
522 return "AL";
523 break;
525 return "NA";
526 break;
528 return "RA";
529 break;
530 default:
531 return "ER";
532 }
533}
534
535
536QString
538{
539 switch(m_ionType)
540 {
542 return "y";
543 break;
545 return "yP";
546 break;
548 return "y*";
549 break;
551 return "yO";
552 break;
554 return "b*";
555 break;
557 return "bO";
558 break;
560 return "a";
561 break;
563 return "a*";
564 break;
566 return "aO";
567 break;
569 return "c";
570 break;
571 // SvgIon.moxygen - mN
573 return "z";
574 break;
576 return "b";
577 break;
579 return "bP";
580 break;
582 return "x";
583 break;
584 default:
585 throw PappsoException(QString("Enums::PeptideIon name not implemented"));
586 break;
587 }
588}
589
590
591QString
593{
594 switch(type)
595 {
597 return "both";
598 break;
600 return "native";
601 break;
603 return "symmetric";
604 break;
605 default:
606 return "synthetic";
607 }
608}
609
610QString
612{
613 auto it = precisionUnitMap.find(precision_unit);
614 if(it != precisionUnitMap.end())
615 {
616 return it->second;
617 }
618
619 throw pappso::ExceptionNotFound(QObject::tr("precision unit not found in precisionUnitMap"));
620}
621
622QString
624{
625 QString version(PAPPSOMSPP_VERSION);
626 return version;
627}
628
629
633{
635
636 pappso::AaModificationP oxidation =
637 pappso::AaModification::getInstance("MOD:00425"); // MOD:00425 15.994915
639 pappso::MzRange(oxidation->getMass(), precision).contains(mass))
640 {
641 return oxidation;
642 }
643 pappso::AaModificationP iodoacetamide =
644 pappso::AaModification::getInstance("MOD:00397"); // 57.021465
645 if(pappso::MzRange(iodoacetamide->getMass(), precision).contains(mass))
646 {
647 return iodoacetamide;
648 }
649 pappso::AaModificationP acetylated =
650 pappso::AaModification::getInstance("MOD:00408"); // 42.010567
651 if(pappso::MzRange(acetylated->getMass(), precision).contains(mass))
652 {
653 return acetylated;
654 }
655 pappso::AaModificationP phosphorylated =
656 pappso::AaModification::getInstance("MOD:00696"); // 79.96633
657 if(pappso::MzRange(phosphorylated->getMass(), precision).contains(mass))
658 {
659 return phosphorylated;
660 }
661 pappso::AaModificationP ammonia = pappso::AaModification::getInstance("MOD:01160"); //-17.026548
662 if(pappso::MzRange(ammonia->getMass(), precision).contains(mass))
663 {
664 return ammonia;
665 }
666 pappso::AaModificationP dehydrated =
667 pappso::AaModification::getInstance("MOD:00704"); //-18.010565
668 if(pappso::MzRange(dehydrated->getMass(), precision).contains(mass))
669 {
670 return dehydrated;
671 }
672 pappso::AaModificationP dimethylated =
673 pappso::AaModification::getInstance("MOD:00429"); // 28.0313
674 if(pappso::MzRange(dimethylated->getMass(), precision).contains(mass))
675 {
676 return dimethylated;
677 }
678
679 pappso::AaModificationP dimethylated_medium = pappso::AaModification::getInstance("MOD:00552");
680 if(pappso::MzRange(dimethylated_medium->getMass(), precision).contains(mass))
681 {
682 return dimethylated_medium;
683 }
684
685 pappso::AaModificationP dimethylated_heavy = pappso::AaModification::getInstance("MOD:00638");
686 if(pappso::MzRange(dimethylated_heavy->getMass(), precision).contains(mass))
687 {
688 return dimethylated_heavy;
689 }
690 pappso::AaModificationP DimethylpyrroleAdduct = pappso::AaModification::getInstance("MOD:00628");
691 if(pappso::MzRange(DimethylpyrroleAdduct->getMass(), precision).contains(mass))
692 {
693 return DimethylpyrroleAdduct;
694 }
695
696 // modification not found, creating customized mod :
698
700 QObject::tr("Utils::guessAaModificationPbyMonoisotopicMassDelta => "
701 "modification not found for mass %1")
702 .arg(mass));
703}
704
705
707Utils::translateAaModificationFromUnimod(const QString &unimod_accession)
708{
709 if(unimod_accession == "UNIMOD:1")
710 {
711
712 return pappso::AaModification::getInstance("MOD:00394");
713 }
714 if(unimod_accession == "UNIMOD:4")
715 {
716
717 return pappso::AaModification::getInstance("MOD:00397");
718 }
719 if(unimod_accession == "UNIMOD:7")
720 {
721
722 return pappso::AaModification::getInstance("MOD:00400");
723 }
724 if(unimod_accession == "UNIMOD:27")
725 {
726
727 return pappso::AaModification::getInstance("MOD:00420");
728 }
729 // UNIMOD:28 => MOD:00040
730 if(unimod_accession == "UNIMOD:28")
731 {
732
733 return pappso::AaModification::getInstance("MOD:00040");
734 }
735
736 if(unimod_accession == "UNIMOD:35")
737 {
738
739 return pappso::AaModification::getInstance("MOD:00425");
740 }
741 qInfo() << "unimod_accession:" << unimod_accession << " not found";
742 return nullptr;
743}
744
745} // namespace pappso
pappso_double getMass() const
static AaModificationP getInstance(const QString &accession)
static AaModificationP getInstanceCustomizedMod(pappso_double modificationMass)
bool contains(pappso_double) const
Definition mzrange.cpp:120
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
static std::size_t extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
Definition utils.cpp:258
static QString chronoTimePointDebugString(const QString &msg, std::chrono::system_clock::time_point chrono_time=std::chrono::system_clock::now())
Definition utils.cpp:352
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:517
static QString pointerToString(const void *const pointer)
Definition utils.cpp:290
static QString msDataFormatAsString(Enums::MsDataFormat mz_format)
Convenience function to return a string describing the MzFormat of a file.
Definition utils.cpp:458
static pappso_double roundToDecimals(pappso_double value, int decimal_places)
Definition utils.cpp:140
static QRegularExpression anythingButDigitDotDash
Definition utils.h:55
static bool almostEqual(double value1, double value2, int decimalPlaces=10)
Definition utils.cpp:299
static AaModificationP guessAaModificationPbyMonoisotopicMassDelta(Enums::AminoAcidChar aa, pappso_double mass)
Definition utils.cpp:631
static std::vector< double > splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:388
static double nearestGreater(double value)
Definition utils.cpp:345
static std::string toUtf8StandardString(const QString &text)
Definition utils.cpp:162
static bool appendToFile(const QString &text, const QString &file_name)
Definition utils.cpp:235
static QString fileReaderTypeAsString(Enums::FileReaderType file_reader_type)
Definition utils.cpp:501
static QString booleanToString(bool value)
convenient function to transform a boolean to QString "TRUE" or "FALSE" QString returned is readable ...
Definition utils.cpp:450
static AaModificationP translateAaModificationFromUnimod(const QString &unimod_accession)
Definition utils.cpp:707
static QString chronoIntervalDebugString(const QString &msg, std::chrono::system_clock::time_point chrono_start, std::chrono::system_clock::time_point chrono_finish=std::chrono::system_clock::now())
Definition utils.cpp:367
static long long int roundToDecimal32bitsAsLongLongInt(pappso_double input)
Definition utils.cpp:150
static bool writeToFile(const QString &text, const QString &file_name)
Definition utils.cpp:212
static std::vector< std::size_t > splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:419
static QRegularExpression signedDoubleNumberExponentialRegExp
Definition utils.h:56
static QRegularExpression xyMassDataFormatRegExp
Definition utils.h:60
static QRegularExpression unsignedDoubleNumberNoExponentialRegExp
Definition utils.h:54
static const QString getLexicalOrderedString(unsigned int num)
Definition utils.cpp:72
static void writeLexicalOrderedString(QTextStream *p_out, unsigned int num)
Definition utils.cpp:84
static int zeroDecimalsInValue(pappso_double value)
0.11 would return 0 (no empty decimal) 2.001 would return 2 1000.0001254 would return 3
Definition utils.cpp:102
static QRegularExpression endOfLineRegExp
Regular expression that tracks the end of line in text files.
Definition utils.h:69
static QString getVersion()
Definition utils.cpp:623
#define PAPPSOMSPP_VERSION
Definition config.h:6
@ SQLite3
SQLite3 format.
Definition types.h:155
@ MGF
Mascot format.
Definition types.h:154
PeptideIon
Enums::PeptideIon enum defines all types of ions (Nter or Cter)
Definition types.h:286
@ a
Nter aldimine ions.
Definition types.h:290
@ y
Cter amino ions.
Definition types.h:295
@ c
Nter amino ions.
Definition types.h:294
@ astar
Nter aldimine ions + NH3 loss.
Definition types.h:291
@ 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
@ x
Cter acylium ions.
Definition types.h:300
@ bo
Nter acylium ions + H2O loss.
Definition types.h:289
@ ao
Nter aldimine ions + H2O loss.
Definition types.h:292
@ z
Cter carbocations.
Definition types.h:298
@ pwiz
using libpwizlite
Definition types.h:178
@ tims
TimsMsRunReader : each scan is returned as a mass spectrum.
Definition types.h:181
@ nonAlign
the type of alignment to put in origin matrix NON Alignment (0 - NA)
Definition types.h:49
@ reAlign
Re Alignment (1 - RE)
Definition types.h:51
ExperimentalSpectrumDataPointType
Definition types.h:78
@ both
both, the ion and the complement exists in the original spectrum
Definition types.h:83
@ symmetric
new peak : computed symmetric mass from a corresponding native peak
Definition types.h:81
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
const AaModification * AaModificationP
double pappso_double
A type definition for doubles.
Definition types.h:61
const PrecisionBase * PrecisionPtr
Definition precision.h:122
std::map< Enums::PrecisionUnit, QString > precisionUnitMap
Definition precision.cpp:43