Class QuantileReferenceColumnsTest

java.lang.Object
ubic.gemma.core.util.math.QuantileReferenceColumnsTest

public class QuantileReferenceColumnsTest extends Object
Which columns define the quantile reference distribution.

Quantile normalization maps every column onto one shared distribution, so a column that contributes to that distribution changes the values of every other column. Outlier assays must not get that vote — and the way they were kept out of it (blanking their values) does not actually work, which is what these tests pin.

  • Constructor Details

    • QuantileReferenceColumnsTest

      public QuantileReferenceColumnsTest()
  • Method Details

    • aBlankedColumnStillVotesOnTheReferenceUnlessExcluded

      @Test public void aBlankedColumnStillVotesOnTheReferenceUnlessExcluded()
      🛑 The trap this whole change exists for: blanking a column does NOT keep it out of the reference.

      imputeMissing fills a missing cell with its ROW MEAN, so an all-NaN column arrives at the reference computation as a synthetic average sample and pulls the distribution toward the centre. Naming it excluded is what actually removes its vote — and the two give different answers, which is the proof.

      ⚠️ The columns below deliberately rank their rows in DIFFERENT orders. When every column agrees on the ordering, the imputed row-mean column sorts to exactly the rank means and has no effect at all — a first draft of this test used such data and could not fail. Real samples never agree that precisely, but the degenerate case is worth knowing about before reading too much into a small effect.

    • anExcludedColumnIsStillMappedOntoTheReference

      @Test public void anExcludedColumnIsStillMappedOntoTheReference()
      The excluded column is still placed on the shared scale — it just does not get to define it. Otherwise the outlier's values would come back on a different scale from everyone else's and the correlations built from them would be meaningless.
    • excludingAnExtremeColumnLeavesTheOthersToNormalizeAmongThemselves

      @Test public void excludingAnExtremeColumnLeavesTheOthersToNormalizeAmongThemselves()
      An extreme column left in the reference drags it; excluded, the remaining columns normalize among themselves. This is the effect on the data everyone else reads, not just on the outlier's own column.
    • nullReferenceKeepsTheHistoricalBehaviour

      @Test public void nullReferenceKeepsTheHistoricalBehaviour()
      Null means every column votes, which is what every caller outside the processed-vector pipeline still does.
    • everyColumnExcludedIsRejectedRatherThanProducingNaN

      @Test public void everyColumnExcludedIsRejectedRatherThanProducingNaN()