OpenMS
Loading...
Searching...
No Matches
ConsensusMapNormalizerAlgorithmThreshold Class Reference

Intensity normalisation of a ConsensusMap by averaging per-feature intensity ratios against a reference map. More...

#include <OpenMS/ANALYSIS/MAPMATCHING/ConsensusMapNormalizerAlgorithmThreshold.h>

Public Member Functions

 ConsensusMapNormalizerAlgorithmThreshold ()
 Default constructor.
 
virtual ~ConsensusMapNormalizerAlgorithmThreshold ()
 Destructor.
 

Static Public Member Functions

static std::vector< double > computeCorrelation (const ConsensusMap &map, const double &ratio_threshold, const std::string &acc_filter, const std::string &desc_filter)
 Compute one normalisation factor per map.
 
static void normalizeMaps (ConsensusMap &map, const std::vector< double > &ratios)
 Multiply every feature handle's intensity by its map's factor.
 

Private Member Functions

 ConsensusMapNormalizerAlgorithmThreshold (const ConsensusMapNormalizerAlgorithmThreshold &copyin)
 Copy construction is deliberately suppressed.
 
ConsensusMapNormalizerAlgorithmThresholdoperator= (const ConsensusMapNormalizerAlgorithmThreshold &rhs)
 Assignment is deliberately suppressed.
 

Detailed Description

Intensity normalisation of a ConsensusMap by averaging per-feature intensity ratios against a reference map.

A stateless utility class – computeCorrelation derives one scalar normalisation factor per map, and normalizeMaps applies those factors to every feature handle in the consensus map.

The reference map is the one with the most features (largest size in the column headers). For each other map, the ratio reference_intensity / map_intensity is computed per feature that is present in both maps, then averaged after dropping ratios that fall outside the configurable ratio_threshold window (see computeCorrelation).

Copy construction and assignment are deliberately suppressed.

Constructor & Destructor Documentation

◆ ConsensusMapNormalizerAlgorithmThreshold() [1/2]

Copy construction is deliberately suppressed.

◆ ConsensusMapNormalizerAlgorithmThreshold() [2/2]

Default constructor.

◆ ~ConsensusMapNormalizerAlgorithmThreshold()

Destructor.

Member Function Documentation

◆ computeCorrelation()

static std::vector< double > computeCorrelation ( const ConsensusMap map,
const double &  ratio_threshold,
const std::string &  acc_filter,
const std::string &  desc_filter 
)
static

Compute one normalisation factor per map.

The reference map is the column-header entry with the largest size in map. For every other map j and every consensus feature that has a non-zero intensity in both the reference and j, the ratio reference_intensity / intensity_j is collected; ratios outside the window (ratio_threshold, 1/ratio_threshold) are discarded as outliers. The mean of the surviving ratios is returned as the factor for map j.

Features are first filtered by acc_filter (regex on protein accessions) and desc_filter (regex on protein descriptions); only features that pass both filters contribute to the ratios.

Warning
When no feature passes the filters for a given map (the surviving ratio list is empty), the function returns a vector of 1.0 of length number_of_maps and logs a warning – i.e. the result is "no normalisation".
Parameters
[in]mapConsensusMap providing the per-map feature handles.
[in]ratio_thresholdLower bound of the kept-ratio window. Use e.g. 0.5 to keep ratios in (0.5, 2.0).
[in]acc_filterRegex applied to accession strings; empty means "match anything".
[in]desc_filterRegex applied to description strings; empty means "match anything".
Returns
One normalisation factor per map (size equals map.getColumnHeaders().size()).

◆ normalizeMaps()

static void normalizeMaps ( ConsensusMap map,
const std::vector< double > &  ratios 
)
static

Multiply every feature handle's intensity by its map's factor.

Iterates every consensus feature in map and, for each sub-feature handle, multiplies its intensity by ratios[handle.getMapIndex()]. Progress is reported to the console via ProgressLogger.

Parameters
[in,out]mapConsensus map whose feature-handle intensities are scaled in place.
[in]ratiosPer-map factors (typically obtained from computeCorrelation). Must have at least (max-map-index + 1) entries.

◆ operator=()

Assignment is deliberately suppressed.