OpenMS
Loading...
Searching...
No Matches
MQEvidenceExporter.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: Chris Bielow$
6// $Authors: Valentin Noske, Vincent Musch$
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <fstream>
18
19#include <map>
20
21class OPENMS_DLLAPI MQEvidence
35{
36private:
37 std::fstream file_;
38 OpenMS::Size id_ = 0;
40
45
63 const OpenMS::Feature& f,
64 const OpenMS::ConsensusMap& cmap,
65 const OpenMS::Size c_feature_number,
66 const OpenMS::String& raw_file,
67 const std::multimap<OpenMS::String, std::pair<OpenMS::Size, OpenMS::Size>>& UIDs,
69 const OpenMS::MSExperiment& exp= {},
70 const std::map<OpenMS::String,OpenMS::String>& prot_map = {});
71
72public:
85 explicit MQEvidence(const OpenMS::String& path);
86
91
106 const OpenMS::FeatureMap& feature_map,
107 const OpenMS::ConsensusMap& cmap,
108 const OpenMS::MSExperiment& exp= {},
109 const std::map<OpenMS::String,OpenMS::String>& prot_map = {});
110};
Builds a MaxQuant Evidence.txt.
Definition MQEvidenceExporter.h:35
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 MQEvidence.txt.
MQEvidence(const OpenMS::String &path)
Creates MQEvidence object and evidence.txt in given path.
void exportFeatureMap(const OpenMS::FeatureMap &feature_map, const OpenMS::ConsensusMap &cmap, const OpenMS::MSExperiment &exp={}, const std::map< OpenMS::String, OpenMS::String > &prot_map={})
Exports a FeatureMap to the evidence.txt.
OpenMS::String filename_
path and name of the evidence.txt
Definition MQEvidenceExporter.h:39
void exportHeader_()
Writes the header of evidence.txt (Names of columns)
~MQEvidence()
Closes f_stream.
std::fstream file_
Stream where the data is added to create evidence.txt.
Definition MQEvidenceExporter.h:37
A container for consensus elements.
Definition ConsensusMap.h:68
A container for features.
Definition FeatureMap.h:82
An LC-MS feature.
Definition Feature.h:46
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
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:61