OpenMS
Loading...
Searching...
No Matches
ConsensusMapNormalizerAlgorithmMedian.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: Johannes Veit $
6// $Authors: Johannes Junker $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13
14#include <map>
15
16namespace OpenMS
17{
18
24 {
27
28private:
31
34
35public:
38
41
46 enum NormalizationMethod { NM_SCALE, NM_SHIFT };
47
55 static void normalizeMaps(ConsensusMap & map, NormalizationMethod method, const std::string& acc_filter, const std::string& desc_filter);
56
70 static Size computeMedians(const ConsensusMap & map, std::vector<double> & medians, const std::string& acc_filter, const std::string& desc_filter);
71
81 static bool passesFilters_(ConsensusMap::ConstIterator cf_it, const ConsensusMap& map, const std::string& acc_filter, const std::string& desc_filter);
82
93 static std::map<UInt64, Size> mapPositions_(const ConsensusMap& map);
94
99 static Size mapPosition_(const std::map<UInt64, Size>& positions, UInt64 map_index);
100 };
101
102} // namespace OpenMS
103
Algorithms of ConsensusMapNormalizer.
Definition ConsensusMapNormalizerAlgorithmMedian.h:24
NormalizationMethod
The NormalizationMethod enum Whether to scale to same median using division/multiplication or shift u...
Definition ConsensusMapNormalizerAlgorithmMedian.h:46
@ NM_SCALE
Definition ConsensusMapNormalizerAlgorithmMedian.h:46
static Size mapPosition_(const std::map< UInt64, Size > &positions, UInt64 map_index)
Position of map_index in positions (from mapPositions_())
static Size computeMedians(const ConsensusMap &map, std::vector< double > &medians, const std::string &acc_filter, const std::string &desc_filter)
computes medians of all maps and returns index of map with most features
ConsensusMapNormalizerAlgorithmMedian & operator=(const ConsensusMapNormalizerAlgorithmMedian &rhs)
assignment operator is not implemented -> private
static void normalizeMaps(ConsensusMap &map, NormalizationMethod method, const std::string &acc_filter, const std::string &desc_filter)
normalizes the maps of the consensusMap
static bool passesFilters_(ConsensusMap::ConstIterator cf_it, const ConsensusMap &map, const std::string &acc_filter, const std::string &desc_filter)
returns whether consensus feature passes filters returns whether consensus feature cf_it in map passe...
virtual ~ConsensusMapNormalizerAlgorithmMedian()
destructor is not implemented -> private
static std::map< UInt64, Size > mapPositions_(const ConsensusMap &map)
Position of every map index among the column headers of map (in map index order)
ConsensusMapNormalizerAlgorithmMedian()
default constructor is not implemented -> private
ConsensusMapNormalizerAlgorithmMedian(const ConsensusMapNormalizerAlgorithmMedian &copyin)
copy constructor is not implemented -> private
Intensity normalisation of a ConsensusMap by averaging per-feature intensity ratios against a referen...
Definition ConsensusMapNormalizerAlgorithmThreshold.h:36
A container for consensus elements.
Definition ConsensusMap.h:67
const_iterator ConstIterator
Definition ConsensusMap.h:115
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19