libpappsomspp
Library for mass spectrometry
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"
38#include "../exportinmportconfig.h"
39
40
41namespace pappso
42{
43
44class MsRunId;
45typedef std::shared_ptr<const MsRunId> MsRunIdCstSPtr;
46
47
48/** @brief MS run identity
49 * MsRunId identifies an MS run with a unique ID (XmlId)
50 * and contains eventually informations on its location (local disk path or URL)
51 */
53{
54 public:
55 MsRunId();
56 MsRunId(const QString &file_name);
57 MsRunId(const QString &file_name, const QString &run_id);
58 MsRunId(const MsRunId &other);
59 virtual ~MsRunId();
60
61 bool operator==(const MsRunId &other) const;
62 MsRunId &operator=(const MsRunId &other);
63
64 void setFileName(const QString &file_name);
65 const QString &getFileName() const;
66
67 void setRunId(const QString &run_id);
68 const QString &getRunId() const;
69
70 /** @brief set an XML unique identifier for this MsRunId
71 * @param xml_id this id must respect XML constraints (no space characters)
72 */
73 void setXmlId(const QString &xml_id);
74 const QString &getXmlId() const;
75
76 /** @brief set a sample name for this MsRunId
77 */
78 void setSampleName(const QString &name);
79 const QString &getSampleName() const;
80
81 void setMzFormat(MzFormat format);
82 MzFormat getMzFormat() const;
83
84 QString toString() const;
85
86 bool isValid() const;
87
88 private:
89 QString m_fileName = "NOT_SET";
90 QString m_runId;
91 QString m_xmlId; /* a1.... */
92 QString m_sampleName;
94};
95
96
97} // namespace pappso
98
99
101extern int msRunIdMetaTypeId;
102
104extern int msRunIdCstSPtrMetaTypeId;
MS run identity MsRunId identifies an MS run with a unique ID (XmlId) and contains eventually informa...
Definition: msrunid.h:53
QString m_runId
Definition: msrunid.h:90
QString m_xmlId
Definition: msrunid.h:91
QString m_sampleName
Definition: msrunid.h:92
#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
MzFormat
Definition: types.h:107
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition: msrunid.h:45
bool operator==(Aa const &l, Aa const &r)
Definition: aa.cpp:280