libpappsomspp
Library for mass spectrometry
mzformatenumstr.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/msfile/mzformatenumstr.cpp
3 * \date 12/2/2021
4 * \author Olivier Langella <olivier.langella@universite-paris-saclay.fr>
5 * \brief convert mzformat enumerations to strings
6 *
7 */
8
9/*******************************************************************************
10 * Copyright (c) 2021 Olivier Langella
11 *<olivier.langella@universite-paris-saclay.fr>.
12 *
13 * This file is part of the PAPPSOms++ library.
14 *
15 * PAPPSOms++ is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * PAPPSOms++ is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
27 *
28 ******************************************************************************/
29
30#include "mzformatenumstr.h"
31#include "../pappsoexception.h"
32#include <QObject>
33
34using namespace pappso;
35
36const QString
38{
39
40 QString mz_format_str;
41 switch(mz_format_enum)
42 {
44 mz_format_str = "abSciexT2D";
45 break;
47 mz_format_str = "abSciexWiff";
48 break;
50 mz_format_str = "agilentMassHunter";
51 break;
53 mz_format_str = "brukerBaf";
54 break;
56 mz_format_str = "brukerFid";
57 break;
59 mz_format_str = "brukerTims";
60 break;
62 mz_format_str = "brukerYep";
63 break;
64 case MzFormat::MGF:
65 mz_format_str = "MGF";
66 break;
67 case MzFormat::msn:
68 mz_format_str = "msn";
69 break;
70 case MzFormat::mz5:
71 mz_format_str = "mz5";
72 break;
73 case MzFormat::mzML:
74 mz_format_str = "mzML";
75 break;
76 case MzFormat::mzXML:
77 mz_format_str = "mzXML";
78 break;
80 mz_format_str = "SQLite3";
81 break;
83 mz_format_str = "thermoRaw";
84 break;
86 mz_format_str = "watersRaw";
87 break;
88 case MzFormat::xy:
89 mz_format_str = "xy";
90 break;
91 default:
92 throw pappso::PappsoException(QObject::tr("MzFormat unknown :\n%1")
93 .arg((std::uint8_t)mz_format_enum));
94 }
95 return mz_format_str;
96}
static const QString toString(MzFormat mz_format_enum)
convert mz format enumeration to human readable string
convert mzformat enumerations to strings
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
MzFormat
Definition: types.h:120
@ xy
(x,y) format
@ SQLite3
SQLite3 format.
@ MGF
Mascot format.