![]() |
OpenMS
|
Quantile-normalisation of feature intensities across the maps of a ConsensusMap. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/ConsensusMapNormalizerAlgorithmQuantile.h>
Public Member Functions | |
| ConsensusMapNormalizerAlgorithmQuantile () | |
| Default constructor. | |
| virtual | ~ConsensusMapNormalizerAlgorithmQuantile () |
| Destructor. | |
Static Public Member Functions | |
| static void | normalizeMaps (ConsensusMap &map) |
Quantile-normalise the feature intensities of map in place. | |
| static void | resample (const std::vector< double > &data_in, std::vector< double > &data_out, UInt n_resampling_points) |
Linearly resample data_in to n_resampling_points evenly-spaced positions. | |
| static void | extractIntensityVectors (const ConsensusMap &map, std::vector< std::vector< double > > &out_intensities) |
Collect the feature-handle intensities of map into one vector per source map. | |
| static void | setNormalizedIntensityValues (const std::vector< std::vector< double > > &feature_ints, ConsensusMap &map) |
| Push the per-map intensity vectors back into the corresponding feature handles. | |
Private Member Functions | |
| ConsensusMapNormalizerAlgorithmQuantile (const ConsensusMapNormalizerAlgorithmQuantile ©in) | |
| Copy construction is deliberately suppressed. | |
| ConsensusMapNormalizerAlgorithmQuantile & | operator= (const ConsensusMapNormalizerAlgorithmQuantile &rhs) |
| Assignment is deliberately suppressed. | |
Quantile-normalisation of feature intensities across the maps of a ConsensusMap.
Stateless utility class. normalizeMaps rescales every map's sorted intensity distribution to a shared reference distribution derived from the average of the per-map quantiles, so that all maps end up sharing the same intensity distribution while their internal intensity ranks are preserved.
Copy construction and assignment are deliberately suppressed.
|
private |
Copy construction is deliberately suppressed.
Default constructor.
|
virtual |
Destructor.
|
static |
Collect the feature-handle intensities of map into one vector per source map.
out_intensities is cleared and resized to the number of column-header entries; the per-map row receives the intensities of every feature handle whose map_index points at it (in the iteration order of the consensus features).
| [in] | map | Source ConsensusMap. |
| [out] | out_intensities | Per-map intensity vectors; index j contains the intensities of all feature handles whose map-index is j. |
| Exception::ElementNotFound | when the column-header lookup for one of the expected map indices fails. |
|
static |
Quantile-normalise the feature intensities of map in place.
Builds a reference intensity distribution by sorting each map's feature intensities, resampling each sorted distribution to a common length (the size of the largest map), and averaging the resampled distributions per quantile. The intensities are then written back to the consensus features rank-preservingly: the feature with the k -th smallest intensity in map j gets the k -th smallest value of the resampled reference distribution for map j (after a second resampling step that shrinks the reference back to map j 's original length).
| [in,out] | map | Consensus map whose feature-handle intensities are rewritten in place. Per-map column-header indices 0 ... N-1 must each be present (extractIntensityVectors throws otherwise). |
| Exception::ElementNotFound | when a column-header index in 0 ... N-1 is missing from map (propagated from extractIntensityVectors). |
|
private |
Assignment is deliberately suppressed.
|
static |
Linearly resample data_in to n_resampling_points evenly-spaced positions.
The output is cleared, resized to n_resampling_points and filled by linear interpolation between consecutive data_in entries:
data_out.front() takes data_in.front() and data_out.back() takes data_in.back().n_resampling_points is 0 the output is just cleared and the function returns.| [in] | data_in | Source vector; assumed sorted by the caller (normalizeMaps sorts before calling). |
| [out] | data_out | Destination vector; cleared and resized. |
| [in] | n_resampling_points | Number of points to produce. |
|
static |
Push the per-map intensity vectors back into the corresponding feature handles.
Iterates the consensus features of map in the same order as extractIntensityVectors and writes feature_ints[map_index][k] into the k -th feature handle of that map index. The caller is responsible for keeping feature_ints in lock-step with the iteration order used by extractIntensityVectors – normalizeMaps does this by mutating the same per-map vector in place.
| [in] | feature_ints | Per-map intensity vectors (same shape as the output of extractIntensityVectors). |
| [in,out] | map | Consensus map whose feature-handle intensities are updated in place. |