OpenMS
Loading...
Searching...
No Matches
MRMFeaturePickerFile.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: Douglas McCloskey, Pasquale Domenico Colaianni $
6// $Authors: Douglas McCloskey, Pasquale Domenico Colaianni $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h> // OPENMS_DLLAPI
14#include <map>
15
16namespace OpenMS
17{
46 class OPENMS_DLLAPI MRMFeaturePickerFile :
47 public CsvFile
48 {
49public:
53 ~MRMFeaturePickerFile() override = default;
54
82 void load(
83 const std::string& filename,
84 std::vector<MRMFeaturePicker::ComponentParams>& cp_list,
85 std::vector<MRMFeaturePicker::ComponentGroupParams>& cgp_list
86 );
87
88protected:
108 const StringList& line,
109 const std::map<std::string, Size>& headers,
112 ) const;
113
137 void setCastValue_(const std::string& key, const std::string& value, Param& params) const;
138 };
139}
140
This class handles csv files. Currently only loading is implemented.
Definition CsvFile.h:31
Loads MRM component and component-group parameter sets from a comma-separated file.
Definition MRMFeaturePickerFile.h:48
void load(const std::string &filename, std::vector< MRMFeaturePicker::ComponentParams > &cp_list, std::vector< MRMFeaturePicker::ComponentGroupParams > &cgp_list)
Read filename and populate cp_list / cgp_list.
MRMFeaturePickerFile()=default
Default constructor.
void setCastValue_(const std::string &key, const std::string &value, Param &params) const
Insert value into params under key, converting the string to the type expected for that parameter nam...
bool extractParamsFromLine_(const StringList &line, const std::map< std::string, Size > &headers, MRMFeaturePicker::ComponentParams &cp, MRMFeaturePicker::ComponentGroupParams &cgp) const
Extract the ComponentParams and ComponentGroupParams entries from a single parsed CSV line.
~MRMFeaturePickerFile() override=default
Destructor.
Structure to contain information about a component group with its parameters.
Definition MRMFeaturePicker.h:48
Structure to contain information about a single component with its parameters.
Definition MRMFeaturePicker.h:40
Management and storage of parameters / INI files.
Definition Param.h:46
std::vector< std::string > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19