libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
massspectrumid.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
#include <limits>
28
29
#include <QString>
30
31
#include "../exportinmportconfig.h"
32
33
#include "../msrun/msrunid.h"
34
35
36
namespace
pappso
37
{
38
39
class
PMSPP_LIB_DECL
MassSpectrumId
40
{
41
private
:
42
MsRunIdCstSPtr
mcsp_msRunId =
nullptr
;
43
44
// This is the native id string that is stored in the mzML file. Its structure
45
// is dependent on the vendor/format of the original data. In some cases, it
46
// is possible to ask libpwiz to extract from it the scan number of the
47
// spectrum. For water/mdsciex files, this is not possible. We thus need to
48
// rely on the index of the spectrum in the spectrum list for the ms run of
49
// interest. By combining the run id and the spectrum index, it is possible to
50
// unambiguously identify a mass spectrum from a given file.
51
QString
m_nativeId
;
52
53
// The index of the mass spectrum in the spectrum list of a given ms run is
54
// used when the scan number is not easily usable (see the native id comment
55
// above).
56
std::size_t m_spectrumIndex = std::numeric_limits<std::size_t>::max();
57
58
public
:
59
MassSpectrumId
();
60
61
MassSpectrumId
(
const
MsRunIdCstSPtr
&msrun_id);
62
63
MassSpectrumId
(
const
MsRunIdCstSPtr
&msrun_id, std::size_t spectrum_index);
64
65
MassSpectrumId
(
const
MassSpectrumId
&other);
66
~MassSpectrumId
();
67
68
MassSpectrumId
&operator=(
const
MassSpectrumId
&other);
69
70
void
setMsRunId(
MsRunIdCstSPtr
other);
71
const
MsRunIdCstSPtr
&getMsRunIdCstSPtr()
const
;
72
73
void
setNativeId(
const
QString &native_id);
74
const
QString &getNativeId()
const
;
75
76
void
setSpectrumIndex(std::size_t index);
77
std::size_t getSpectrumIndex()
const
;
78
79
bool
operator==
(
const
MassSpectrumId
&other)
const
;
80
81
bool
isValid()
const
;
82
83
QString toString()
const
;
84
};
85
86
87
}
// namespace pappso
pappso::MassSpectrumId
Definition
massspectrumid.h:40
pappso::MassSpectrumId::m_nativeId
QString m_nativeId
Definition
massspectrumid.h:51
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::MsRunIdCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition
msrunid.h:46
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition
aa.cpp:341
pappsomspp
massspectrum
massspectrumid.h
Generated on Tue Feb 13 2024 18:37:12 for libpappsomspp by
1.9.8