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
16
17#include <vector>
18#include <memory>
19
20namespace OpenMS
21{
22 class ExperimentalSettings;
23 namespace Interfaces
24 {
25 class IMSDataConsumer;
26 }
27
28
41 class OPENMS_DLLAPI SwathFile :
42 public ProgressLogger
43 {
44public:
45
47 std::vector<OpenSwath::SwathMap> loadSplit(StringList file_list,
48 const String& tmp,
49 std::shared_ptr<ExperimentalSettings>& exp_meta,
50 const String& readoptions = "normal");
51
68 std::vector<OpenSwath::SwathMap> loadMzML(const String& file,
69 const String& tmp,
70 std::shared_ptr<ExperimentalSettings>& exp_meta,
71 const String& readoptions = "normal",
72 Interfaces::IMSDataConsumer* plugin_consumer = nullptr);
73
75 std::vector<OpenSwath::SwathMap> loadMzXML(const String& file,
76 const String& tmp,
77 std::shared_ptr<ExperimentalSettings>& exp_meta,
78 const String& readoptions = "normal");
79
81 std::vector<OpenSwath::SwathMap> loadSqMass(const String& file, std::shared_ptr<ExperimentalSettings>& /* exp_meta */);
82
83protected:
84
86 OpenSwath::SpectrumAccessPtr doCacheFile_(const String& in, const String& tmp, const String& tmp_fname,
87 const std::shared_ptr<PeakMap >& experiment_metadata);
88
90 std::shared_ptr< PeakMap > populateMetaData_(const String& file);
91
93 void countScansInSwath_(const std::vector<MSSpectrum>& exp,
94 std::vector<int>& swath_counter, int& nr_ms1_spectra,
95 std::vector<OpenSwath::SwathMap>& known_window_boundaries,
96 double TOLERANCE=1e-6);
97
98 };
99}
100
subpage TOPP_TargetedFileConverter Converts targeted feature or consensus feature files subpage TOPP_FileInfo Shows basic information about the file
Definition TOPP.doxygen:44
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:34
File adapter for Swath files.
Definition SwathFile.h:43
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