OpenMS
Loading...
Searching...
No Matches
XIPMParquetFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Justin Sing $
6// $Authors: Justin Sing $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13#include <string>
14#include <vector>
15
16namespace OpenMS
17{
21 class OPENMS_DLLAPI XIPMParquetFile
22 {
23 public:
24 struct OPENMS_DLLAPI XIPMPeakMap
25 {
26 Int64 run_id{0};
27 std::string source_file;
28 Int64 ms_level{0};
29 std::string peakmap_type;
30
31 bool has_precursor_id{false};
32 Int64 precursor_id{0};
33 bool has_transition_id{false};
34 Int64 transition_id{0};
35 std::string modified_sequence;
36 bool has_precursor_charge{false};
37 Int64 precursor_charge{0};
38 bool has_product_charge{false};
39 Int64 product_charge{0};
40 bool has_detecting_transition{false};
41 Int64 detecting_transition{0};
42 bool has_precursor_decoy{false};
43 Int64 precursor_decoy{0};
44 bool has_product_decoy{false};
45 Int64 product_decoy{0};
46 bool has_transition_ordinal{false};
47 Int64 transition_ordinal{0};
48 std::string transition_type;
49 std::string annotation;
50
51 double target_mz{0.0};
52 bool has_target_rt{false};
53 double target_rt{0.0};
54 bool has_target_ion_mobility{false};
55 double target_ion_mobility{0.0};
56 bool has_rt_start{false};
57 double rt_start{0.0};
58 bool has_rt_end{false};
59 double rt_end{0.0};
60
61 std::vector<double> mz;
62 std::vector<double> rt;
63 std::vector<double> ion_mobility;
64 std::vector<double> intensity;
65 };
66
67 struct OPENMS_DLLAPI XIPMRunInfo
68 {
69 Int64 run_id{0};
70 std::string source_file;
71 };
72
73 explicit XIPMParquetFile(const std::string& filename);
74 explicit XIPMParquetFile(const std::vector<std::string>& filenames);
75 XIPMParquetFile(const XIPMParquetFile& rhs) = default;
77
78 const std::string& getFilename() const;
79 const std::vector<std::string>& getFilenames() const;
80
81 void load(std::vector<XIPMPeakMap>& output) const;
82
83 void getPeakMaps(std::vector<XIPMPeakMap>& output,
84 Int64 precursor_id = -1,
85 Int64 transition_id = -1,
86 const std::string& modified_sequence = "",
87 Int64 precursor_charge = -1,
88 Int64 product_charge = -1,
89 Int64 ms_level = -1,
90 Int64 run_id = -1,
91 const std::string& peakmap_type = "") const;
92
93 void getRuns(std::vector<XIPMRunInfo>& output) const;
94 void getColumns(std::vector<std::string>& output) const;
95
96 private:
97 std::string filename_;
98 std::vector<std::string> filenames_;
99 };
100} // namespace OpenMS
Reader for extracted ion peak-map Parquet files (.xipm).
Definition XIPMParquetFile.h:22
XIPMParquetFile(const XIPMParquetFile &rhs)=default
std::string filename_
Definition XIPMParquetFile.h:97
void getPeakMaps(std::vector< XIPMPeakMap > &output, Int64 precursor_id=-1, Int64 transition_id=-1, const std::string &modified_sequence="", Int64 precursor_charge=-1, Int64 product_charge=-1, Int64 ms_level=-1, Int64 run_id=-1, const std::string &peakmap_type="") const
void load(std::vector< XIPMPeakMap > &output) const
const std::vector< std::string > & getFilenames() const
std::vector< std::string > filenames_
Definition XIPMParquetFile.h:98
const std::string & getFilename() const
XIPMParquetFile & operator=(const XIPMParquetFile &rhs)=default
std::vector< double > rt
Definition XIPMParquetFile.h:62
XIPMParquetFile(const std::string &filename)
void getRuns(std::vector< XIPMRunInfo > &output) const
std::vector< double > mz
Definition XIPMParquetFile.h:61
std::string transition_type
Definition XIPMParquetFile.h:48
std::vector< double > intensity
Definition XIPMParquetFile.h:64
std::string peakmap_type
Definition XIPMParquetFile.h:29
void getColumns(std::vector< std::string > &output) const
std::vector< double > ion_mobility
Definition XIPMParquetFile.h:63
std::string annotation
Definition XIPMParquetFile.h:49
std::string source_file
Definition XIPMParquetFile.h:27
std::string modified_sequence
Definition XIPMParquetFile.h:35
XIPMParquetFile(const std::vector< std::string > &filenames)
Definition XIPMParquetFile.h:25
Definition XIPMParquetFile.h:68
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19