OpenMS
Loading...
Searching...
No Matches
SwathFile.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: Hannes Roest $
6// $Authors: Hannes Roest $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13#include <OpenMS/config.h>
17
18#include <vector>
19#include <memory>
20
21namespace OpenMS
22{
23 class ExperimentalSettings;
24 namespace Interfaces
25 {
26 class IMSDataConsumer;
27 }
28
29
42 class OPENMS_DLLAPI SwathFile :
43 public ProgressLogger
44 {
45public:
46
48 std::vector<OpenSwath::SwathMap> loadSplit(StringList file_list,
49 const String& tmp,
50 std::shared_ptr<ExperimentalSettings>& exp_meta,
51 const String& readoptions = "normal");
52
69 std::vector<OpenSwath::SwathMap> loadMzML(const String& file,
70 const String& tmp,
71 std::shared_ptr<ExperimentalSettings>& exp_meta,
72 const String& readoptions = "normal",
73 Interfaces::IMSDataConsumer* plugin_consumer = nullptr);
74
76 std::vector<OpenSwath::SwathMap> loadMzXML(const String& file,
77 const String& tmp,
78 std::shared_ptr<ExperimentalSettings>& exp_meta,
79 const String& readoptions = "normal");
80
82 std::vector<OpenSwath::SwathMap> loadSqMass(const String& file, std::shared_ptr<ExperimentalSettings>& /* exp_meta */);
83
84#ifdef WITH_OPENTIMS
92 std::vector<OpenSwath::SwathMap> loadBrukerTdf(const String& file,
93 std::shared_ptr<ExperimentalSettings>& exp_meta);
94#endif
95
96protected:
97
99 OpenSwath::SpectrumAccessPtr doCacheFile_(const String& in, const String& tmp, const String& tmp_fname,
100 const std::shared_ptr<PeakMap >& experiment_metadata);
101
103 std::shared_ptr< PeakMap > populateMetaData_(const String& file);
104
106 void countScansInSwath_(const std::vector<MSSpectrum>& exp,
107 std::vector<int>& swath_counter, int& nr_ms1_spectra,
108 std::vector<OpenSwath::SwathMap>& known_window_boundaries,
109 double TOLERANCE=1e-6);
110
111 };
112}
The interface of a consumer of spectra and chromatograms.
Definition IMSDataConsumer.h:46
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:27
A more convenient string class.
Definition String.h:32
File adapter for Swath files.
Definition SwathFile.h:44
std::vector< OpenSwath::SwathMap > loadSplit(StringList file_list, const String &tmp, std::shared_ptr< ExperimentalSettings > &exp_meta, const String &readoptions="normal")
Loads a Swath run from a list of split mzML files.
OpenSwath::SpectrumAccessPtr doCacheFile_(const String &in, const String &tmp, const String &tmp_fname, const std::shared_ptr< PeakMap > &experiment_metadata)
Cache a file to disk.
std::vector< OpenSwath::SwathMap > loadMzXML(const String &file, const String &tmp, std::shared_ptr< ExperimentalSettings > &exp_meta, const String &readoptions="normal")
Loads a Swath run from a single mzXML file.
std::vector< OpenSwath::SwathMap > loadSqMass(const String &file, std::shared_ptr< ExperimentalSettings > &)
Loads a Swath run from a single sqMass file.
std::vector< OpenSwath::SwathMap > loadMzML(const String &file, const String &tmp, std::shared_ptr< ExperimentalSettings > &exp_meta, const String &readoptions="normal", Interfaces::IMSDataConsumer *plugin_consumer=nullptr)
Loads a Swath run from a single mzML file.
void countScansInSwath_(const std::vector< MSSpectrum > &exp, std::vector< int > &swath_counter, int &nr_ms1_spectra, std::vector< OpenSwath::SwathMap > &known_window_boundaries, double TOLERANCE=1e-6)
Counts the number of scans in a full Swath file (e.g. concatenated non-split file)
std::shared_ptr< PeakMap > populateMetaData_(const String &file)
Only read the meta data from a file and use it to populate exp_meta.
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
IMSDataConsumer IMSDataConsumer
Definition IMSDataConsumer.h:103
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131