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
33using namespace pappso;
34
35const QString
37{
38
39 QString mz_format_str;
40 switch(mz_format_enum)
41 {
43 mz_format_str = "abSciexT2D";
44 break;
46 mz_format_str = "abSciexWiff";
47 break;
49 mz_format_str = "agilentMassHunter";
50 break;
52 mz_format_str = "brukerBaf";
53 break;
55 mz_format_str = "brukerFid";
56 break;
58 mz_format_str = "brukerTims";
59 break;
61 mz_format_str = "brukerYep";
62 break;
63 case MzFormat::MGF:
64 mz_format_str = "MGF";
65 break;
66 case MzFormat::msn:
67 mz_format_str = "msn";
68 break;
69 case MzFormat::mz5:
70 mz_format_str = "mz5";
71 break;
72 case MzFormat::mzML:
73 mz_format_str = "mzML";
74 break;
75 case MzFormat::mzXML:
76 mz_format_str = "mzXML";
77 break;
79 mz_format_str = "SQLite3";
80 break;
82 mz_format_str = "thermoRaw";
83 break;
85 mz_format_str = "watersRaw";
86 break;
87 case MzFormat::xy:
88 mz_format_str = "xy";
89 break;
90 default:
91 throw pappso::PappsoException(QObject::tr("MzFormat unknown :\n%1")
92 .arg((std::uint8_t)mz_format_enum));
93 }
94 return mz_format_str;
95}
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:107
@ xy
(x,y) format
@ SQLite3
SQLite3 format.
@ MGF
Mascot format.