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#include <QJsonArray>
34
35
36/////////////////////// Local includes
37#include "pappsomspp/config.h"
38#include "utils.h"
39#include "types.h"
41#include "trace/trace.h"
42
43
44namespace pappso
45{
46
47// Matches a double (decimal value, that is, m/z
48// value)
50 QRegularExpression("\\d*\\.?\\d+");
51
52// Matches anything that is not digit, '.', or '-'
53// (that is, matches a separator
54QRegularExpression Utils::anythingButDigitDotDash = QRegularExpression("[^\\d^\\.^-]+");
55
56// Matches a double (with exp notation
57// possibly) and also potentially a '-' sign. This is the intensity.
59 QRegularExpression("-?\\d*\\.?\\d*[e-]?\\d*");
60
61// Matches <number><separator><number>, that is: m/z<separator>intensity.
62QRegularExpression Utils::xyMassDataFormatRegExp =
63 // QRegularExpression("^(\\d*\\.?\\d+)([^\\d^\\.^-]+)(-?\\d*\\.?\\d*[e-]?\\d*)");
64 QRegularExpression(QString("^(%1)(%2)(%3)")
66 .arg(Utils::anythingButDigitDotDash.pattern())
68
69
70QRegularExpression Utils::endOfLineRegExp = QRegularExpression("^\\s+$");
71
72const QString
74{
75 int size = log10(num);
76 size += 97;
77 QLatin1Char latin1_char(size);
78 QString base(latin1_char);
79 base.append(QString().setNum(num));
80 return (base);
81}
82
83
84void
85Utils::writeLexicalOrderedString(QTextStream *p_out, unsigned int num)
86{
87 *p_out << (char)(log10(num) + 97) << num;
88}
89
90
91//! Determine the number of zero decimals between the decimal point and the
92//! first non-zero decimal.
93/*!
94 * 0.11 would return 0 (no empty decimal)
95 * 2.001 would return 2
96 * 1000.0001254 would return 3
97 *
98 * \param value the value to be analyzed
99 * \return the number of '0' decimals between the decimal separator '.' and
100 * the first non-0 decimal
101 */
102int
104{
105 // qDebug() << qSetRealNumberPrecision(10) << "Double value: " << value;
106
107 int intPart = static_cast<int>(value);
108
109 // qDebug() << "int part:" << intPart;
110
111 double decimalPart = value - intPart;
112
113 // qDebug() << qSetRealNumberPrecision(10) << "decimal part: " << decimalPart;
114
115 int count = 0;
116
117 while(decimalPart > 0)
118 {
119 ++count;
120
121 decimalPart *= 10;
122
123 // qDebug() << "Iteration " << count << "decimal part:" << decimalPart;
124
125 if(decimalPart >= 1)
126 {
127 // qDebug() << "Because decimal part " << decimalPart
128 //<< "is >= 1, breaking loop while count is " << count << ".";
129
130 break;
131 }
132 }
133
134 // qDebug() << "Returning count:" << count - 1;
135
136 return count - 1;
137}
138
139
141Utils::roundToDecimals(pappso_double value, int decimal_places)
142{
143 if(decimal_places < 0)
144 return value;
145
146 return ceil((value * pow(10, decimal_places)) - 0.49) / pow(10, decimal_places);
147}
148
149
150long long int
152{
153 pappso::pappso_double test_decimal = 100000000000;
154 if(sizeof(int *) == 4)
155 { // 32bits
156 test_decimal = 100000000;
157 }
158 return (floor(input * test_decimal));
159}
160
161
162// I think this is where the programs that I created for Win11 using MXE
163// crashed upon opening a mzML file. The crash occurred in pwizlite, but
164// my guess is that this is the function where we set the locale that makes
165// the program crash. Just to keep that in mind. Filippo Rusconi 20251209.
166std::string
167Utils::toUtf8StandardString(const QString &text)
168{
169 std::string env_backup;
170 try
171 {
172#ifdef MXE
173 // std::locale::global(std::locale("C")); // set locale to default locale
174 env_backup = std::setlocale(LC_ALL, nullptr);
175 std::setlocale(LC_ALL, "C");
176#else
177 std::locale::global(std::locale("C")); // set locale to default locale
178#endif
179 }
180 catch(std::exception &error)
181 {
183 QObject::tr("Error trying to set local to C : %1").arg(error.what()));
184 }
185 // Now perform the conversion.
186 QByteArray byte_array = text.toUtf8();
187 std::string stdText = "";
188
189 for(char c : byte_array)
190 {
191 stdText += c;
192 }
193
194 try
195 {
196#ifdef MXE
197 // std::locale::global(std::locale("C")); // set locale to default locale
198 std::setlocale(LC_ALL, env_backup.c_str());
199#else // Set back the locale to the backed-up one.
200 std::locale::global(std::locale("")); // sets locale according to OS environment
201#endif
202 }
203 catch(std::exception &error)
204 {
205
207 QObject::tr("Error trying to set local to original system one %1 : %2")
208 .arg(env_backup.c_str())
209 .arg(error.what()));
210 }
211
212 return stdText;
213}
214
215
216bool
217Utils::writeToFile(const QString &text, const QString &file_name)
218{
219
220 QFile file(file_name);
221
222 if(file.open(QFile::WriteOnly | QFile::Truncate))
223 {
224
225 QTextStream out(&file);
226
227 out << text;
228
229 out.flush();
230 file.close();
231
232 return true;
233 }
234
235 return false;
236}
237
238// Typically useful to debug bins...
239bool
240Utils::writeToFile(const std::vector<double> &data, int decimals, const QString &file_name)
241{
242 QFile file(file_name);
243
244 if(file.open(QFile::WriteOnly | QFile::Append))
245 {
246 file.open(QIODevice::WriteOnly);
247
248 QTextStream fileStream(&file);
249
250 for(auto &&value : data)
251 fileStream << QString("%1\n").arg(value, 0, 'f', decimals);
252
253 fileStream.flush();
254 file.close();
255
256 return true;
257 }
258
259 return false;
260}
261
262bool
263Utils::appendToFile(const QString &text, const QString &file_name)
264{
265
266 QFile file(file_name);
267
268 if(file.open(QFile::WriteOnly | QFile::Append))
269 {
270
271 QTextStream out(&file);
272
273 out << text;
274
275 out.flush();
276 file.close();
277
278 return true;
279 }
280
281 return false;
282}
283
284
285std::size_t
286Utils::extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
287{
288 qDebug() << " " << spectrum_native_id;
289 QStringList native_id_list = spectrum_native_id.split("=");
290 if(native_id_list.size() < 2)
291 {
292 throw ExceptionNotFound(
293 QObject::tr("scan number not found in mzML native id %1").arg(spectrum_native_id));
294 }
295 else
296 {
297 /** TODO activate this in a future release to ensure scan number
298 for(auto i = 0; i < native_id_list.size(); i += 2)
299 {
300 if(native_id_list[i] == "scan")
301 {
302 return native_id_list[i + 1].toULong();
303 }
304 }
305
306 throw ExceptionNotFound(
307 QObject::tr("scan number not found in mzML native id %1")
308 .arg(spectrum_native_id));
309
310*/
311 return native_id_list.back().toULong();
312 }
313 return 0;
314}
315
316
317QString
318Utils::pointerToString(const void *const pointer)
319{
320 return QString("%1").arg((quintptr)pointer, QT_POINTER_SIZE * 2, 16, QChar('0'));
321}
322
323
324//! Tell if both double values, are equal within the double representation
325//! capabilities of the platform.
326bool
327Utils::almostEqual(double value1, double value2, int decimalPlaces)
328{
329 // QString value1String = QString("%1").arg(value1,
330 // 0, 'f', 60);
331 // QString value2String = QString("%1").arg(value2,
332 // 0, 'f', 60);
333
334 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
335 //<< "value1:" << value1String << "value2:" << value2String;
336
337 // The machine epsilon has to be scaled to the magnitude of the values used
338 // and multiplied by the desired precision in ULPs (units in the last place)
339 // (decimal places).
340
341 double valueSum = std::abs(value1 + value2);
342 // QString valueSumString = QString("%1").arg(valueSum,
343 // 0, 'f', 60);
344
345 double valueDiff = std::abs(value1 - value2);
346 // QString valueDiffString = QString("%1").arg(valueDiff,
347 // 0, 'f', 60);
348
349 double epsilon = std::numeric_limits<double>::epsilon();
350 // QString epsilonString = QString("%1").arg(epsilon,
351 // 0, 'f', 60);
352
353 double scaleFactor = epsilon * valueSum * decimalPlaces;
354 // QString scaleFactorString = QString("%1").arg(scaleFactor,
355 // 0, 'f', 60);
356
357 // qWarning() << "valueDiff:" << valueDiffString << "valueSum:" <<
358 // valueSumString <<
359 //"epsilon:" << epsilonString << "scaleFactor:" << scaleFactorString;
360
361 bool res = valueDiff < scaleFactor
362 // unless the result is subnormal:
363 || valueDiff < std::numeric_limits<double>::min();
364
365 // qWarning() << __FILE__ << __LINE__ << __FUNCTION__
366 //<< "returning res:" << res;
367
368 return res;
369}
370
371
372double
374{
375 return std::nextafter(value, value + 1);
376}
377
378
379QString
381 std::chrono::system_clock::time_point chrono_time)
382{
383
384 time_t tt;
385
386 tt = std::chrono::system_clock::to_time_t(chrono_time);
387
388 QString debug_text = QString("%1 - %2\n").arg(msg).arg(QString::fromLatin1(ctime(&tt)));
389
390 return debug_text;
391}
392
393
394QString
396 std::chrono::system_clock::time_point chrono_start,
397 std::chrono::system_clock::time_point chrono_finish)
398{
399 QString debug_text =
400 QString(
401 "%1 %2 min = %3 s = %4 ms = %5 "
402 "µs\n")
403 .arg(msg)
404 .arg(std::chrono::duration_cast<std::chrono::minutes>(chrono_finish - chrono_start).count())
405 .arg(std::chrono::duration_cast<std::chrono::seconds>(chrono_finish - chrono_start).count())
406 .arg(
407 std::chrono::duration_cast<std::chrono::milliseconds>(chrono_finish - chrono_start).count())
408 .arg(std::chrono::duration_cast<std::chrono::microseconds>(chrono_finish - chrono_start)
409 .count());
410
411 return debug_text;
412}
413
414
415std::vector<double>
416Utils::splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
417{
418
419 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
420
421 // qDebug() << "string list:" << string_list;
422
423 std::vector<double> double_vector;
424
425 for(int iter = 0; iter < string_list.size(); ++iter)
426 {
427 QString current_string = string_list.at(iter);
428
429 bool ok = false;
430
431 double current_double = current_string.toDouble(&ok);
432
433 if(!current_double && !ok)
434 {
435 ++error_count;
436 continue;
437 }
438
439 double_vector.push_back(current_double);
440 }
441
442 return double_vector;
443}
444
445
446std::vector<std::size_t>
447Utils::splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
448{
449 // qDebug() << "Parsing text:" << text;
450
451 QStringList string_list = text.split(QRegularExpression("[\\s]+"), Qt::SkipEmptyParts);
452
453 // qDebug() << "string list size:" << string_list.size()
454 //<< "values:" << string_list;
455
456 std::vector<std::size_t> sizet_vector;
457
458 for(int iter = 0; iter < string_list.size(); ++iter)
459 {
460 QString current_string = string_list.at(iter);
461
462 bool ok = false;
463
464 std::size_t current_sizet = current_string.toUInt(&ok);
465
466 if(!current_sizet && !ok)
467 {
468 ++error_count;
469 continue;
470 }
471
472 sizet_vector.push_back(current_sizet);
473 }
474
475 return sizet_vector;
476}
477QString
479{
480 if(value)
481 return "TRUE";
482 return "FALSE";
483}
484
485QString
487{
488
489 if(mz_format == Enums::MsDataFormat::mzML)
490 return "mzML";
491 else if(mz_format == Enums::MsDataFormat::mzXML)
492 return "mzXML";
493 else if(mz_format == Enums::MsDataFormat::MGF)
494 return "MGF";
495 else if(mz_format == Enums::MsDataFormat::SQLite3)
496 return "SQLite3";
497 else if(mz_format == Enums::MsDataFormat::xy)
498 return "xy";
499 else if(mz_format == Enums::MsDataFormat::mz5)
500 return "mz5";
501 else if(mz_format == Enums::MsDataFormat::msn)
502 return "msn";
503 else if(mz_format == Enums::MsDataFormat::abSciexWiff)
504 return "abSciexWiff";
505 else if(mz_format == Enums::MsDataFormat::abSciexT2D)
506 return "abSciexT2D";
507 else if(mz_format == Enums::MsDataFormat::agilentMassHunter)
508 return "agilentMassHunter";
509 else if(mz_format == Enums::MsDataFormat::thermoRaw)
510 return "thermoRaw";
511 else if(mz_format == Enums::MsDataFormat::watersRaw)
512 return "watersRaw";
513 else if(mz_format == Enums::MsDataFormat::brukerFid)
514 return "brukerFid";
515 else if(mz_format == Enums::MsDataFormat::brukerYep)
516 return "brukerYep";
517 else if(mz_format == Enums::MsDataFormat::brukerBaf)
518 return "brukerBaf";
519 else if(mz_format == Enums::MsDataFormat::brukerTims)
520 return "brukerTims";
521 else if(mz_format == Enums::MsDataFormat::brukerBafAscii)
522 return "brukerBafAscii";
523 else
524 return "unknown";
525}
526
527
528QString
530{
531
532 if(file_reader_type == Enums::FileReaderType::pwiz)
533 return "pwiz";
534 else if(file_reader_type == Enums::FileReaderType::xy)
535 return "xy";
536 else if(file_reader_type == Enums::FileReaderType::tims)
537 return "tims";
538 else if(file_reader_type == Enums::FileReaderType::tims_frames)
539 return "tims_frames";
540 else
541 return "unknown";
542}
543
544QString
546{
547 switch(type)
548 {
550 return "AL";
551 break;
553 return "NA";
554 break;
556 return "RA";
557 break;
558 default:
559 return "ER";
560 }
561}
562
563
564QString
566{
567 switch(m_ionType)
568 {
570 return "y";
571 break;
573 return "yP";
574 break;
576 return "y*";
577 break;
579 return "yO";
580 break;
582 return "b*";
583 break;
585 return "bO";
586 break;
588 return "a";
589 break;
591 return "a*";
592 break;
594 return "aO";
595 break;
597 return "c";
598 break;
599 // SvgIon.moxygen - mN
601 return "z";
602 break;
604 return "b";
605 break;
607 return "bP";
608 break;
610 return "x";
611 break;
612 default:
613 throw PappsoException(QString("Enums::PeptideIon name not implemented"));
614 break;
615 }
616}
617
618
619QString
621{
622 switch(type)
623 {
625 return "both";
626 break;
628 return "native";
629 break;
631 return "symmetric";
632 break;
633 default:
634 return "synthetic";
635 }
636}
637
638QString
640{
641 auto it = precisionUnitMap.find(precision_unit);
642 if(it != precisionUnitMap.end())
643 {
644 return it->second;
645 }
646
647 throw pappso::ExceptionNotFound(QObject::tr("precision unit not found in precisionUnitMap"));
648}
649
650QString
652{
653 QString version(PAPPSOMSPP_VERSION);
654 return version;
655}
656
657
661{
663
664 pappso::AaModificationP oxidation =
665 pappso::AaModification::getInstance("MOD:00425"); // MOD:00425 15.994915
667 pappso::MzRange(oxidation->getMass(), precision).contains(mass))
668 {
669 return oxidation;
670 }
671 pappso::AaModificationP iodoacetamide =
672 pappso::AaModification::getInstance("MOD:00397"); // 57.021465
673 if(pappso::MzRange(iodoacetamide->getMass(), precision).contains(mass))
674 {
675 return iodoacetamide;
676 }
677 pappso::AaModificationP acetylated =
678 pappso::AaModification::getInstance("MOD:00408"); // 42.010567
679 if(pappso::MzRange(acetylated->getMass(), precision).contains(mass))
680 {
681 return acetylated;
682 }
683 pappso::AaModificationP phosphorylated =
684 pappso::AaModification::getInstance("MOD:00696"); // 79.96633
685 if(pappso::MzRange(phosphorylated->getMass(), precision).contains(mass))
686 {
687 return phosphorylated;
688 }
689 pappso::AaModificationP ammonia = pappso::AaModification::getInstance("MOD:01160"); //-17.026548
690 if(pappso::MzRange(ammonia->getMass(), precision).contains(mass))
691 {
692 return ammonia;
693 }
694 pappso::AaModificationP dehydrated =
695 pappso::AaModification::getInstance("MOD:00704"); //-18.010565
696 if(pappso::MzRange(dehydrated->getMass(), precision).contains(mass))
697 {
698 return dehydrated;
699 }
700 pappso::AaModificationP dimethylated =
701 pappso::AaModification::getInstance("MOD:00429"); // 28.0313
702 if(pappso::MzRange(dimethylated->getMass(), precision).contains(mass))
703 {
704 return dimethylated;
705 }
706
707 pappso::AaModificationP dimethylated_medium = pappso::AaModification::getInstance("MOD:00552");
708 if(pappso::MzRange(dimethylated_medium->getMass(), precision).contains(mass))
709 {
710 return dimethylated_medium;
711 }
712
713 pappso::AaModificationP dimethylated_heavy = pappso::AaModification::getInstance("MOD:00638");
714 if(pappso::MzRange(dimethylated_heavy->getMass(), precision).contains(mass))
715 {
716 return dimethylated_heavy;
717 }
718 pappso::AaModificationP DimethylpyrroleAdduct = pappso::AaModification::getInstance("MOD:00628");
719 if(pappso::MzRange(DimethylpyrroleAdduct->getMass(), precision).contains(mass))
720 {
721 return DimethylpyrroleAdduct;
722 }
723
724 // modification not found, creating customized mod :
726
728 QObject::tr("Utils::guessAaModificationPbyMonoisotopicMassDelta => "
729 "modification not found for mass %1")
730 .arg(mass));
731}
732
733
735Utils::translateAaModificationFromUnimod(const QString &unimod_accession)
736{
737 if(unimod_accession == "UNIMOD:1")
738 {
739
740 return pappso::AaModification::getInstance("MOD:00394");
741 }
742 if(unimod_accession == "UNIMOD:4")
743 {
744
745 return pappso::AaModification::getInstance("MOD:00397");
746 }
747 if(unimod_accession == "UNIMOD:7")
748 {
749
750 return pappso::AaModification::getInstance("MOD:00400");
751 }
752 if(unimod_accession == "UNIMOD:27")
753 {
754
755 return pappso::AaModification::getInstance("MOD:00420");
756 }
757 // UNIMOD:28 => MOD:00040
758 if(unimod_accession == "UNIMOD:28")
759 {
760
761 return pappso::AaModification::getInstance("MOD:00040");
762 }
763
764 if(unimod_accession == "UNIMOD:35")
765 {
766
767 return pappso::AaModification::getInstance("MOD:00425");
768 }
769 qInfo() << "unimod_accession:" << unimod_accession << " not found";
770 return nullptr;
771}
772
773
774QJsonArray
775Utils::toJson(const std::vector<double> &myVec)
776{
777 QJsonArray result;
778 for(auto i = myVec.begin(); i != myVec.end(); i++)
779 {
780 result.push_back((*i));
781 }
782 return result;
783}
784
785} // 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:116
static PrecisionPtr getDaltonInstance(pappso_double value)
get a Dalton precision pointer
static std::size_t extractScanNumberFromMzmlNativeId(const QString &spectrum_native_id)
Definition utils.cpp:286
static QString chronoTimePointDebugString(const QString &msg, std::chrono::system_clock::time_point chrono_time=std::chrono::system_clock::now())
Definition utils.cpp:380
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:545
static QString pointerToString(const void *const pointer)
Definition utils.cpp:318
static QString msDataFormatAsString(Enums::MsDataFormat mz_format)
Convenience function to return a string describing the MzFormat of a file.
Definition utils.cpp:486
static pappso_double roundToDecimals(pappso_double value, int decimal_places)
Definition utils.cpp:141
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:327
static AaModificationP guessAaModificationPbyMonoisotopicMassDelta(Enums::AminoAcidChar aa, pappso_double mass)
Definition utils.cpp:659
static std::vector< double > splitMzStringToDoubleVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:416
static double nearestGreater(double value)
Definition utils.cpp:373
static std::string toUtf8StandardString(const QString &text)
Definition utils.cpp:167
static bool appendToFile(const QString &text, const QString &file_name)
Definition utils.cpp:263
static QString fileReaderTypeAsString(Enums::FileReaderType file_reader_type)
Definition utils.cpp:529
static QString booleanToString(bool value)
convenient function to transform a boolean to QString "TRUE" or "FALSE" QString returned is readable ...
Definition utils.cpp:478
static AaModificationP translateAaModificationFromUnimod(const QString &unimod_accession)
Definition utils.cpp:735
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:395
static long long int roundToDecimal32bitsAsLongLongInt(pappso_double input)
Definition utils.cpp:151
static bool writeToFile(const QString &text, const QString &file_name)
Definition utils.cpp:217
static std::vector< std::size_t > splitSizetStringToSizetVectorWithSpaces(const QString &text, std::size_t &error_count)
Definition utils.cpp:447
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:73
static QJsonArray toJson(const std::vector< double > &myVec)
convert vector of double into json array
Definition utils.cpp:775
static void writeLexicalOrderedString(QTextStream *p_out, unsigned int num)
Definition utils.cpp:85
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:103
static QRegularExpression endOfLineRegExp
Regular expression that tracks the end of line in text files.
Definition utils.h:69
static QString getVersion()
Definition utils.cpp:651
#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