libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
msrunid.h
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
25#pragma once
26
27/////////////////////// StdLib includes
28#include <memory>
29
30
31/////////////////////// Qt includes
32#include <QString>
33#include <QMetaType>
34
35
36/////////////////////// Local includes
37#include "../types.h"
39
40
41namespace pappso
42{
43
44class MsRunId;
45typedef std::shared_ptr<MsRunId> MsRunIdSPtr;
46typedef std::shared_ptr<const MsRunId> MsRunIdCstSPtr;
47
48
49/** @brief MS run identity
50 * MsRunId identifies an MS run with a unique ID (XmlId)
51 * and contains eventually informations on its location (local disk path or URL)
52 */
54{
55 public:
56 MsRunId();
57 MsRunId(const QString &file_name);
58 MsRunId(const QString &file_name, const QString &run_id);
59 MsRunId(const MsRunId &other);
60 virtual ~MsRunId();
61
62 bool operator==(const MsRunId &other) const;
63 MsRunId &operator=(const MsRunId &other);
64
65 void setFileName(const QString &file_name);
66 const QString &getFileName() const;
67
68 void setRunId(const QString &run_id);
69 const QString &getRunId() const;
70
71 /** @brief set an XML unique identifier for this MsRunId
72 * @param xml_id this id must respect XML constraints (no space characters)
73 */
74 void setXmlId(const QString &xml_id);
75 const QString &getXmlId() const;
76
77 /** @brief set a sample name for this MsRunId
78 */
79 void setSampleName(const QString &name);
80 const QString &getSampleName() const;
81
82 void setMsDataFormat(MsDataFormat format);
83 MsDataFormat getMsDataFormat() const;
84
85 QString toString() const;
86
87 bool isValid() const;
88
89 private:
90 QString m_fileName = "NOT_SET";
91 QString m_runId;
92 QString m_xmlId; /* a1.... */
93 QString m_sampleName;
94 MsDataFormat m_mzFormat = MsDataFormat::mzXML;
95};
96
97
98} // namespace pappso
99
100
102extern int msRunIdMetaTypeId;
103
105extern int msRunIdCstSPtrMetaTypeId;
MS run identity MsRunId identifies an MS run with a unique ID (XmlId) and contains eventually informa...
Definition msrunid.h:54
QString m_runId
Definition msrunid.h:91
QString m_xmlId
Definition msrunid.h:92
QString m_sampleName
Definition msrunid.h:93
#define PMSPP_LIB_DECL
int msRunIdCstSPtrMetaTypeId
Definition msrunid.cpp:32
Q_DECLARE_METATYPE(pappso::MsRunId)
int msRunIdMetaTypeId
Definition msrunid.cpp:29
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
MsDataFormat
Definition types.h:120
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< MsRunId > MsRunIdSPtr
Definition msrunid.h:45
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:342
This header contains all the type re-definitions and all the global variables definitions used in the...