OpenMS
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MSPFile.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: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
16 
17 #include <vector>
18 
19 namespace OpenMS
20 {
21  class AnnotatedMSRun;
30  class OPENMS_DLLAPI MSPFile :
31  public DefaultParamHandler
32  {
33 public:
34 
40 
42  MSPFile(const MSPFile & rhs);
43 
45  ~MSPFile() override;
47 
49  MSPFile & operator=(const MSPFile & rhs);
50 
62  void load(const String & filename, PeptideIdentificationList & ids, PeakMap & exp);
63 
74  void load(const String & filename, AnnotatedMSRun & annot_exp);
75 
81  void store(const String & filename, const AnnotatedMSRun & exp) const;
82 
83 protected:
84 
86  void parseHeader_(const String & header, PeakSpectrum & spec);
87  };
88 
89 } // namespace OpenMS
90 
Class for storing MS run data with peptide and protein identifications.
Definition: AnnotatedMSRun.h:36
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:49
File adapter for MSP files (NIST spectra library)
Definition: MSPFile.h:32
void load(const String &filename, PeptideIdentificationList &ids, PeakMap &exp)
Loads a map from a MSPFile file.
void store(const String &filename, const AnnotatedMSRun &exp) const
Stores a map in a MSPFile file.
void parseHeader_(const String &header, PeakSpectrum &spec)
reads the header information and stores it as metainfo in the spectrum
void load(const String &filename, AnnotatedMSRun &annot_exp)
Loads a map from a MSPFile file.
MSPFile()
Default constructor.
MSPFile(const MSPFile &rhs)
Copy constructor.
~MSPFile() override
Destructor.
MSPFile & operator=(const MSPFile &rhs)
assignment operator
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Container for peptide identifications from multiple spectra.
Definition: PeptideIdentificationList.h:66
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19