OpenMS
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 <boost/shared_ptr.hpp>
19 
20 namespace OpenMS
21 {
22  class ExperimentalSettings;
23  namespace Interfaces
24  {
25  class IMSDataConsumer;
26  }
27 
28 
41  class OPENMS_DLLAPI SwathFile :
42  public ProgressLogger
43  {
44 public:
45 
47  std::vector<OpenSwath::SwathMap> loadSplit(StringList file_list,
48  const String& tmp,
49  boost::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  boost::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  boost::shared_ptr<ExperimentalSettings>& exp_meta,
78  const String& readoptions = "normal");
79 
81  std::vector<OpenSwath::SwathMap> loadSqMass(const String& file, boost::shared_ptr<ExperimentalSettings>& /* exp_meta */);
82 
83 protected:
84 
86  OpenSwath::SpectrumAccessPtr doCacheFile_(const String& in, const String& tmp, const String& tmp_fname,
87  const boost::shared_ptr<PeakMap >& experiment_metadata);
88 
90  boost::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 
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 > loadMzML(const String &file, const String &tmp, boost::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::vector< OpenSwath::SwathMap > loadSqMass(const String &file, boost::shared_ptr< ExperimentalSettings > &)
Loads a Swath run from a single sqMass file.
boost::shared_ptr< PeakMap > populateMetaData_(const String &file)
Only read the meta data from a file and use it to populate exp_meta.
std::vector< OpenSwath::SwathMap > loadSplit(StringList file_list, const String &tmp, boost::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 boost::shared_ptr< PeakMap > &experiment_metadata)
Cache a file to disk.
std::vector< OpenSwath::SwathMap > loadMzXML(const String &file, const String &tmp, boost::shared_ptr< ExperimentalSettings > &exp_meta, const String &readoptions="normal")
Loads a Swath run from a single mzXML file.
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
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131