OpenMS
Loading...
Searching...
No Matches
BrukerTimsFile.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#pragma once
5
6#include <OpenMS/config.h>
7
8#ifdef WITH_OPENTIMS
9
14#include <cstdint>
15#include <string>
16
17class TimsDataHandle;
18
19namespace OpenMS
20{
21 class FullSwathFileConsumer;
22
46 class OPENMS_DLLAPI BrukerTimsFile : public ProgressLogger
47 {
48 public:
50 struct Config
51 {
52 double calibration_tolerance = 0.0;
53 bool calibrate = false;
54
55 float ms1_centroid_mz_ppm = 0.0f;
56 float ms1_centroid_im_pct = 0.0f;
57
58 int dia_ms2_n_neighbors = 0;
59 int dia_ms2_min_support = 1;
60 bool dia_ms2_centroid = false;
61
62 enum ExportMode { AUTO, SPECTRUM, FRAME };
63 ExportMode export_mode = AUTO;
64
67 enum class TimsCalibrationStrategy { AUTO, BRUKER_SDK, RATIONAL, LINEAR };
68 TimsCalibrationStrategy tims_calibration_strategy = TimsCalibrationStrategy::AUTO;
69
73 enum class PressureCompensation { NONE, GLOBAL, PER_FRAME };
74 PressureCompensation pressure_compensation = PressureCompensation::NONE;
75
78 std::string bruker_sdk_path;
79 };
80
82 struct DIAStreamingMetadata
83 {
84 std::vector<OpenSwath::SwathMap> boundaries;
85 int nr_ms1_spectra = 0;
86 std::vector<int> nr_ms2_spectra;
87 };
88
91 DIAStreamingMetadata readDIAMetadata(const String& path, ExperimentalSettings& exp_settings);
93 DIAStreamingMetadata readDIAMetadata(const String& path, ExperimentalSettings& exp_settings,
94 const Config& config);
95
99 void loadDIAStreaming(const String& path, FullSwathFileConsumer& consumer);
101 void loadDIAStreaming(const String& path, FullSwathFileConsumer& consumer,
102 const Config& config);
103
105 void load(const String& path, MSExperiment& exp);
107 void load(const String& path, MSExperiment& exp, const Config& config);
108
112 void transform(const String& path, Interfaces::IMSDataConsumer* consumer);
114 void transform(const String& path, Interfaces::IMSDataConsumer* consumer, const Config& config);
115
116 private:
118 void loadDDA_(TimsDataHandle& handle, MSExperiment& exp, const Config& config);
119
121 void loadDIA_(TimsDataHandle& handle, MSExperiment& exp, const Config& config);
122
124 void loadFrames_(TimsDataHandle& handle, MSExperiment& exp, const Config& config);
125
127 bool isDIA_(const String& tdf_path) const;
128
130 void loadExperimentalSettings_(const String& path, ExperimentalSettings& settings);
131 };
132
133} // namespace OpenMS
134
135#endif // WITH_OPENTIMS
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19