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
27
28/////////////////////// Qt includes
29#include <QDebug>
30#include <QFile>
31#include <QTextStream>
32#include <QJsonArray>
33
34
35/////////////////////// Local includes
36#include "pappsomspp/config.h"
37#include "utils.h"
38#include "types.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
161// I think this is where the programs that I created for Win11 using MXE
162// crashed upon opening a mzML file. The crash occurred in pwizlite, but
163// my guess is that this is the function where we set the locale that makes
164// the program crash. Just to keep that in mind. Filippo Rusconi 20251209.
165std::string
166Utils::toUtf8StandardString(const QString &text)
167{
168 std::string env_backup;
169 try
170 {
171#ifdef MXE
172 // std::locale::global(std::locale("C")); // set locale to default locale
173 env_backup = std::setlocale(LC_ALL, nullptr);
174 std::setlocale(LC_ALL, "C");
175#else
176 std::locale::global(std::locale("C")); // set locale to default locale
177#endif
178 }
179 catch(std::exception &error)
180 {
182 QObject::tr("Error trying to set local to C : %1").arg(error.what()));
183 }
184 // Now perform the conversion.
185 QByteArray byte_array = text.toUtf8();
186 std::string stdText = "";
187
188 for(char c : byte_array)
189 {
190 stdText += c;
191 }
192
193 try
194 {
195#ifdef MXE
196 // std::locale::global(std::locale("C")); // set locale to default locale
197 std::setlocale(LC_ALL, env_backup.c_str());
198#else // Set back the locale to the backed-up one.
199 std::locale::global(std::locale("")); // sets locale according to OS environment
200#endif
201 }
202 catch(std::exception &error)
203 {
204
206 QObject::tr("Error trying to set local to original system one %1 : %2")
207 .arg(env_backup.c_str())
208 .arg(error.what()));
209 }
210
211 return stdText;
212}
213
214
215bool
216Utils::writeToFile(const QString &text, const QString &file_name)
217{
218
219 QFile file(file_name);
220
221 if(file.open(QFile::WriteOnly | QFile::Truncate))
222 {
223
224 QTextStream out(&file);
225
226 out << text;
227
228 out.flush();
229 file.close();
230
231 return true;
232 }
233
234 return false;
235}
236
237// Typically useful to debug bins...
238bool
239Utils::writeToFile(const std::vector<double> &data, int decimals, const QString &file_name)
240{
241 QFile file(file_name);
242
243 if(file.open(QFile::WriteOnly | QFile::Append))
244 {
245 file.open(QIODevice::WriteOnly);
246
247 QTextStream fileStream(&file);
248
249 for(auto &&value : data)
250 fileStream << QString("%1\n").arg(value, 0, 'f', decimals);
251
252 fileStream.flush();
253 file.close();
254
255 return true;
256 }
257
258 return false;
259}
260
261bool
262Utils::appendToFile(const QString &text, const QString &file_name)
263{
264
265 QFile file(file_name);
266
267 if(file.open(QFile::WriteOnly | QFile::Append))
268 {
269
270 QTextStream out(&file);
271
272 out << text;
273
274 out.flush();
275 file.close();
276
277 return true;
278 }
279
280 return false;
281}
282
283
284std::size_t
285Utils::extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
286{
287 qDebug() << " " << spectrum_native_id;
288 QStringList native_id_list = spectrum_native_id.split("=");
289 if(native_id_list.size() < 2)
290 {
291 throw ExceptionNotFound(
292 QObject::tr("scan number not found in mzML native id %1").arg(spectrum_native_id));
293 }
294 else
295 {
296 /** TODO activate this in a future release to ensure scan number
297 for(auto i = 0; i < native_id_list.size(); i += 2)
298 {
299 if(native_id_list[i] == "scan")
300 {
301 return native_id_list[i + 1].toULong();
302 }
303 }
304
305 throw ExceptionNotFound(
306 QObject::tr("scan number not found in mzML native id %1")
307 .arg(spectrum_native_id));
308
309*/
310 return native_id_list.back().toULong();
311 }
312 return 0;
313}
314
315
316QString
317Utils::pointerToString(const void *const pointer)
318{
319 return QString("%1").arg((quintptr)pointer, QT_POINTER_SIZE * 2, 16, QChar('0'));
320}
321
322
323//! Tell if both double values, are equal within the double representation
324//! capabilities of the platform.
325bool
326Utils::almostEqual(double value1, double value2, int decimalPlaces)
327{
328 // QString value1String = QString("%1").arg(value1,
329 // 0, 'f', 60);
330 // QString value2String = QString("%1").arg(value2,
331 // 0, 'f', 60);
332
333 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
334 //<< "value1:" << value1String << "value2:" << value2String;
335
336 // The machine epsilon has to be scaled to the magnitude of the values used
337 // and multiplied by the desired precision in ULPs (units in the last place)
338 // (decimal places).
339
340 double valueSum = std::abs(value1 + value2);
341 // QString valueSumString = QString("%1").arg(valueSum,
342 // 0, 'f', 60);
343
344 double valueDiff = std::abs(value1 - value2);
345 // QString valueDiffString = QString("%1").arg(valueDiff,
346 // 0, 'f', 60);
347
348 double epsilon = std::numeric_limits<double>::epsilon();
349 // QString epsilonString = QString("%1").arg(epsilon,
350 // 0, 'f', 60);
351
352 double scaleFactor = epsilon * valueSum * decimalPlaces;
353 // QString scaleFactorString = QString("%1").arg(scaleFactor,
354 // 0, 'f', 60);
355
356 // qWarning() << "valueDiff:" << valueDiffString << "valueSum:" <<
357 // valueSumString <<
358 //"epsilon:" << epsilonString << "scaleFactor:" << scaleFactorString;
359
360 bool res = valueDiff < scaleFactor
361 // unless the result is subnormal:
362 || valueDiff < std::numeric_limits<double>::min();
363
364 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
365 //<< "returning res:" << res;
366
367 return res;
368}
369
370
371double
373{
374 return std::nextafter(value, value + 1);
375}
376
377
378QString
380 std::chrono::system_clock::time_point chrono_time)
381{
382
383 time_t tt;
384
385 tt = std::chrono::system_clock::to_time_t(chrono_time);
386
387 QString debug_text = QString("%1 - %2\n").arg(msg).arg(QString::fromLatin1(ctime(&tt)));
388
389 return debug_text;
390}
391
392
393QString
395 std::chrono::system_clock::time_point chrono_start,
396 std::chrono::system_clock::time_point chrono_finish)
397{
398 QString debug_text =
399 QString(
400 "%1 %2 min = %3 s = %4 ms = %5 "
401 "µs\n")
402 .arg(msg)
403 .arg(std::chrono::duration_cast<std::chrono::minutes>(chrono_finish - chrono_start).count())
404 .arg(std::chrono::duration_cast<std::chrono::seconds>(chrono_finish - chrono_start).count())
405 .arg(
406 std::chrono::duration_cast<std::chrono::milliseconds>(chrono_finish - chrono_start).count())
407 .arg(std::chrono::duration_cast<std::chrono::microseconds>(chrono_finish - chrono_start)
408 .count());
409
410 return debug_text;
411}
412
413
414std::vector<double>
415Utils::splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
416{
417
418 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
419
420 // qDebug() << "string list:" << string_list;
421
422 std::vector<double> double_vector;
423
424 for(int iter = 0; iter < string_list.size(); ++iter)
425 {
426 QString current_string = string_list.at(iter);
427
428 bool ok = false;
429
430 double current_double = current_string.toDouble(&ok);
431
432 if(!current_double && !ok)
433 {
434 ++error_count;
435 continue;
436 }
437
438 double_vector.push_back(current_double);
439 }
440
441 return double_vector;
442}
443
444
445std::vector<std::size_t>
446Utils::splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
447{
448 // qDebug() << "Parsing text:" << text;
449
450 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
451
452 // qDebug() << "string list size:" << string_list.size()
453 //<< "values:" << string_list;
454
455 std::vector<std::size_t> sizet_vector;
456
457 for(int iter = 0; iter < string_list.size(); ++iter)
458 {
459 QString current_string = string_list.at(iter);
460
461 bool ok = false;
462
463 std::size_t current_sizet = current_string.toUInt(&ok);
464
465 if(!current_sizet && !ok)
466 {
467 ++error_count;
468 continue;
469 }
470
471 sizet_vector.push_back(current_sizet);
472 }
473
474 return sizet_vector;
475}
476QString
478{
479 if(value)
480 return "TRUE";
481 return "FALSE";
482}
483
484QString
486{
487
488 if(mz_format == Enums::MsDataFormat::mzML)
489 return "mzML";
490 else if(mz_format == Enums::MsDataFormat::mzXML)
491 return "mzXML";
492 else if(mz_format == Enums::MsDataFormat::MGF)
493 return "MGF";
494 else if(mz_format == Enums::MsDataFormat::SQLite3)
495 return "SQLite3";
496 else if(mz_format == Enums::MsDataFormat::xy)
497 return "xy";
498 else if(mz_format == Enums::MsDataFormat::mz5)
499 return "mz5";
500 else if(mz_format == Enums::MsDataFormat::msn)
501 return "msn";
502 else if(mz_format == Enums::MsDataFormat::abSciexWiff)
503 return "abSciexWiff";
504 else if(mz_format == Enums::MsDataFormat::abSciexT2D)
505 return "abSciexT2D";
506 else if(mz_format == Enums::MsDataFormat::agilentMassHunter)
507 return "agilentMassHunter";
508 else if(mz_format == Enums::MsDataFormat::thermoRaw)
509 return "thermoRaw";
510 else if(mz_format == Enums::MsDataFormat::watersRaw)
511 return "watersRaw";
512 else if(mz_format == Enums::MsDataFormat::brukerFid)
513 return "brukerFid";
514 else if(mz_format == Enums::MsDataFormat::brukerYep)
515 return "brukerYep";
516 else if(mz_format == Enums::MsDataFormat::brukerBaf)
517 return "brukerBaf";
518 else if(mz_format == Enums::MsDataFormat::brukerTims)
519 return "brukerTims";
520 else if(mz_format == Enums::MsDataFormat::brukerBafAscii)
521 return "brukerBafAscii";
522 else
523 return "unknown";
524}
525
526
527QString
529{
530
531 if(file_reader_type == Enums::FileReaderType::pwiz)
532 return "pwiz";
533 else if(file_reader_type == Enums::FileReaderType::xy)
534 return "xy";
535 else if(file_reader_type == Enums::FileReaderType::tims)
536 return "tims";
537 else if(file_reader_type == Enums::FileReaderType::tims_frames)
538 return "tims_frames";
539 else
540 return "unknown";
541}
542
543QString
545{
546 switch(type)
547 {
549 return "AL";
550 break;
552 return "NA";
553 break;
555 return "RA";
556 break;
557 default:
558 return "ER";
559 }
560}
561
562
563QString
565{
566 switch(m_ionType)
567 {
569 return "y";
570 break;
572 return "yP";
573 break;
575 return "y*";
576 break;
578 return "yO";
579 break;
581 return "b*";
582 break;
584 return "bO";
585 break;
587 return "a";
588 break;
590 return "a*";
591 break;
593 return "aO";
594 break;
596 return "c";
597 break;
598 // SvgIon.moxygen - mN
600 return "z";
601 break;
603 return "b";
604 break;
606 return "bP";
607 break;
609 return "x";
610 break;
611 default:
612 throw PappsoException(QString("Enums::PeptideIon name not implemented"));
613 break;
614 }
615}
616
617
618QString
620{
621 switch(type)
622 {
624 return "both";
625 break;
627 return "native";
628 break;
630 return "symmetric";
631 break;
632 default:
633 return "synthetic";
634 }
635}
636
637QString
639{
640 auto it = precisionUnitMap.find(precision_unit);
641 if(it != precisionUnitMap.end())
642 {
643 return it->second;
644 }
645
646 throw pappso::ExceptionNotFound(QObject::tr("precision unit not found in precisionUnitMap"));
647}
648
649QString
651{
652 QString version(PAPPSOMSPP_VERSION);
653 return version;
654}
655
656
660{
662
663 pappso::AaModificationP oxidation =
664 pappso::AaModification::getInstance("MOD:00425"); // MOD:00425 15.994915
666 pappso::MzRange(oxidation->getMass(), precision).contains(mass))
667 {
668 return oxidation;
669 }
670 pappso::AaModificationP iodoacetamide =
671 pappso::AaModification::getInstance("MOD:00397"); // 57.021465
672 if(pappso::MzRange(iodoacetamide->getMass(), precision).contains(mass))
673 {
674 return iodoacetamide;
675 }
676 pappso::AaModificationP acetylated =
677 pappso::AaModification::getInstance("MOD:00408"); // 42.010567
678 if(pappso::MzRange(acetylated->getMass(), precision).contains(mass))
679 {
680 return acetylated;
681 }
682 pappso::AaModificationP phosphorylated =
683 pappso::AaModification::getInstance("MOD:00696"); // 79.96633
684 if(pappso::MzRange(phosphorylated->getMass(), precision).contains(mass))
685 {
686 return phosphorylated;
687 }
688 pappso::AaModificationP ammonia = pappso::AaModification::getInstance("MOD:01160"); //-17.026548
689 if(pappso::MzRange(ammonia->getMass(), precision).contains(mass))
690 {
691 return ammonia;
692 }
693 pappso::AaModificationP dehydrated =
694 pappso::AaModification::getInstance("MOD:00704"); //-18.010565
695 if(pappso::MzRange(dehydrated->getMass(), precision).contains(mass))
696 {
697 return dehydrated;
698 }
699 pappso::AaModificationP dimethylated =
700 pappso::AaModification::getInstance("MOD:00429"); // 28.0313
701 if(pappso::MzRange(dimethylated->getMass(), precision).contains(mass))
702 {
703 return dimethylated;
704 }
705
706 pappso::AaModificationP dimethylated_medium = pappso::AaModification::getInstance("MOD:00552");
707 if(pappso::MzRange(dimethylated_medium->getMass(), precision).contains(mass))
708 {
709 return dimethylated_medium;
710 }
711
712 pappso::AaModificationP dimethylated_heavy = pappso::AaModification::getInstance("MOD:00638");
713 if(pappso::MzRange(dimethylated_heavy->getMass(), precision).contains(mass))
714 {
715 return dimethylated_heavy;
716 }
717 pappso::AaModificationP DimethylpyrroleAdduct = pappso::AaModification::getInstance("MOD:00628");
718 if(pappso::MzRange(DimethylpyrroleAdduct->getMass(), precision).contains(mass))
719 {
720 return DimethylpyrroleAdduct;
721 }
722
723 // modification not found, creating customized mod :
725
727 QObject::tr("Utils::guessAaModificationPbyMonoisotopicMassDelta => "
728 "modification not found for mass %1")
729 .arg(mass));
730}
731
732
734Utils::translateAaModificationFromUnimod(const QString &unimod_accession)
735{
736 if(unimod_accession == "UNIMOD:1")
737 {
738
739 return pappso::AaModification::getInstance("MOD:00394");
740 }
741 if(unimod_accession == "UNIMOD:4")
742 {
743
744 return pappso::AaModification::getInstance("MOD:00397");
745 }
746 if(unimod_accession == "UNIMOD:7")
747 {
748
749 return pappso::AaModification::getInstance("MOD:00400");
750 }
751 if(unimod_accession == "UNIMOD:27")
752 {
753
754 return pappso::AaModification::getInstance("MOD:00420");
755 }
756 // UNIMOD:28 => MOD:00040
757 if(unimod_accession == "UNIMOD:28")
758 {
759
760 return pappso::AaModification::getInstance("MOD:00040");
761 }
762
763 if(unimod_accession == "UNIMOD:35")
764 {
765
766 return pappso::AaModification::getInstance("MOD:00425");
767 }
768 qInfo() << "unimod_accession:" << unimod_accession << " not found";
769 return nullptr;
770}
771
772
773QJsonArray
774Utils::toJson(const std::vector<double> &myVec)
775{
776 QJsonArray result;
777 for(auto i = myVec.begin(); i != myVec.end(); i++)
778 {
779 result.push_back((*i));
780 }
781 return result;
782}
783
784} // 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:115
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
static std::size_t extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
Definition utils.cpp:285
static QString chronoTimePointDebugString(const QString &msg, std::chrono::system_clock::time_point chrono_time=std::chrono::system_clock::now())
Definition utils.cpp:379
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:544
static QString pointerToString(const void *const pointer)
Definition utils.cpp:317
static QString msDataFormatAsString(Enums::MsDataFormat mz_format)
Convenience function to return a string describing the MzFormat of a file.
Definition utils.cpp:485
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)
Tell if both double values, are equal within the double representation capabilities of the platform.
Definition utils.cpp:326
static AaModificationP guessAaModificationPbyMonoisotopicMassDelta(Enums::AminoAcidChar aa, pappso_double mass)
Definition utils.cpp:658
static std::vector< double > splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:415
static double nearestGreater(double value)
Definition utils.cpp:372
static std::string toUtf8StandardString(const QString &text)
Definition utils.cpp:166
static bool appendToFile(const QString &text, const QString &file_name)
Definition utils.cpp:262
static QString fileReaderTypeAsString(Enums::FileReaderType file_reader_type)
Definition utils.cpp:528
static QString booleanToString(bool value)
convenient function to transform a boolean to QString "TRUE" or "FALSE" QString returned is readable ...
Definition utils.cpp:477
static AaModificationP translateAaModificationFromUnimod(const QString &unimod_accession)
Definition utils.cpp:734
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:394
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:216
static std::vector< std::size_t > splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:446
static QRegularExpression signedDoubleNumberExponentialRegExp
Definition utils.h:56
static QRegularExpression xyMassDataFormatRegExp
Regular expression matching <numerical value><non-numerical*><numericalvalue>.
Definition utils.h:60
static QRegularExpression unsignedDoubleNumberNoExponentialRegExp
Definition utils.h:54
static const QString getLexicalOrderedString(unsigned int num)
Definition utils.cpp:72
static QJsonArray toJson(const std::vector< double > &myVec)
convert vector of double into json array
Definition utils.cpp:774
static void writeLexicalOrderedString(QTextStream *p_out, unsigned int num)
Definition utils.cpp:84
static int zeroDecimalsInValue(pappso_double value)
Determine the number of zero decimals between the decimal point and the first non-zero decimal.
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:650
#define PAPPSOMSPP_VERSION
Definition config.h:6
@ SQLite3
SQLite3 format.
Definition types.h:153
@ MGF
Mascot format.
Definition types.h:152
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:177
@ 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:60
const PrecisionBase * PrecisionPtr
Definition precision.h:122
std::map< Enums::PrecisionUnit, QString > precisionUnitMap
Definition precision.cpp:43