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 
15 
16 #include <vector>
17 
18 namespace OpenMS
19 {
20  class AnnotatedMSRun;
29  class OPENMS_DLLAPI MSPFile :
30  public DefaultParamHandler
31  {
32 public:
33 
39 
41  MSPFile(const MSPFile & rhs);
42 
44  ~MSPFile() override;
46 
48  MSPFile & operator=(const MSPFile & rhs);
49 
61  void load(const String & filename, std::vector<PeptideIdentification> & ids, PeakMap & exp);
62 
73  void load(const String & filename, AnnotatedMSRun & annot_exp);
74 
80  void store(const String & filename, const AnnotatedMSRun & exp) const;
81 
82 protected:
83 
85  void parseHeader_(const String & header, PeakSpectrum & spec);
86  };
87 
88 } // namespace OpenMS
89 
Class for storing MS run data with peptide and protein identifications.
Definition: AnnotatedMSRun.h:34
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:31
void store(const String &filename, const AnnotatedMSRun &exp) const
Stores a map in a MSPFile file.
void load(const String &filename, std::vector< PeptideIdentification > &ids, PeakMap &exp)
Loads a map from 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
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19