OpenMS
MQMsmsExporter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Chris Bielow$
6 // $Authors: Hendrik Beschorner, Lenny Kovac, Virginia Rossow$
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
13 #include <fstream>
16 #include <OpenMS/KERNEL/Feature.h>
20 
21 
37 class OPENMS_DLLAPI MQMsms
38 
39 {
40 private:
41  std::fstream file_;
42  OpenMS::Size id_ = 0;
44 
48  void exportHeader_();
49 
68  const OpenMS::ConsensusMap& cmap,
69  const OpenMS::Size c_feature_number,
70  const OpenMS::String& raw_file,
71  const std::multimap<OpenMS::String, std::pair<OpenMS::Size, OpenMS::Size>>& UIDs,
73  const OpenMS::MSExperiment& exp = {},
74  const std::map<OpenMS::String,OpenMS::String>& prot_map = {});
75 
76 public:
89  explicit MQMsms(const OpenMS::String& path);
90 
95 
96  void exportFeatureMap(const OpenMS::FeatureMap& feature_map, const OpenMS::ConsensusMap& cmap,
97  const OpenMS::MSExperiment& exp, const std::map<OpenMS::String,OpenMS::String>& prot_map = {});
98 
99 };
Builds a MaxQuant msms.txt.
Definition: MQMsmsExporter.h:39
~MQMsms()
Closes f_stream.
MQMsms(const OpenMS::String &path)
Creates MQMsms object and msms.txt in given path.
OpenMS::String filename_
path and name of the msms.txt
Definition: MQMsmsExporter.h:43
void exportRowFromFeature_(const OpenMS::Feature &f, const OpenMS::ConsensusMap &cmap, const OpenMS::Size c_feature_number, const OpenMS::String &raw_file, const std::multimap< OpenMS::String, std::pair< OpenMS::Size, OpenMS::Size >> &UIDs, const OpenMS::ProteinIdentification::Mapping &mp_f, const OpenMS::MSExperiment &exp={}, const std::map< OpenMS::String, OpenMS::String > &prot_map={})
Export one Feature as a row in msms.txt.
void exportHeader_()
Writes the header of msms.txt (Names of columns)
void exportFeatureMap(const OpenMS::FeatureMap &feature_map, const OpenMS::ConsensusMap &cmap, const OpenMS::MSExperiment &exp, const std::map< OpenMS::String, OpenMS::String > &prot_map={})
std::fstream file_
Stream where the data is added to create msms.txt.
Definition: MQMsmsExporter.h:41
A container for consensus elements.
Definition: ConsensusMap.h:66
A container for features.
Definition: FeatureMap.h:80
An LC-MS feature.
Definition: Feature.h:46
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:45
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
two way mapping from ms-run-path to protID|pepID-identifier
Definition: ProteinIdentification.h:57