Normalizes the maps of a consensus map by a per-map offset that may vary with retention time.
More...
Normalizes the maps of a consensus map by a per-map offset that may vary with retention time.
Runs of one experiment differ in their overall loading, and their ion signal can also drift along the gradient (spray stability, source contamination). A single factor per map removes the first, not the second. This algorithm removes both: every map gets a log2 offset o(t) that is estimated locally in retention time from features quantified across the maps, and each intensity is divided by 2^o(t). The recipe follows the run normalisation of andes (bigbio/andes, quant::normalize).
- Reference features are the consensus features with an intensity in at least
min_maps maps that pass the accession and description filters. Their intensities in all maps are reference cells.
- Backfitting. All offsets start at 0. Each of
rounds rounds
- sets the level of every reference feature to the mean over its maps of
log2(intensity) - o,
- computes the residual
z = log2(intensity) - level of every reference cell, and
- sets the offset of every reference cell to the median residual of the
neighbors reference cells of the same map before it and the neighbors after it in retention time; the cell's own residual is left out.
- Other features (fewer maps, filtered out) take the median residual of the
neighbors reference cells of the map on each side of their retention time.
- A map with fewer than
min_reference reference cells is not normalized. When fewer than two maps qualify, nothing is normalized.
The level of a feature is its mean over all of its maps, its own map included, so a map that drifts does not pull the offsets of the other maps. Because the level is the mean over the maps, the offsets of one feature average to roughly zero and the overall intensity scale is kept.
The retention time of a cell is the retention time of its feature handle. For maps that were aligned before linking, this is the aligned retention time; any retention time scale that is monotonic within a map gives the same result. The intensity of the consensus feature itself is left unchanged, as in ConsensusMapNormalizerAlgorithmMedian.