Class DatasetsWebService.MeanVarianceValueObject

java.lang.Object
ubic.gemma.rest.DatasetsWebService.MeanVarianceValueObject
Enclosing class:
DatasetsWebService

public static final class DatasetsWebService.MeanVarianceValueObject extends Object
Wire shape for DatasetsWebService.getDatasetMeanVariance(DatasetArg): parallel mean / variance arrays. Design-element ids / names and the optional limma/edgeR fit curve are placeholders for now: Gemma's MeanVarianceRelation stores only the numeric arrays.

The arrays hold one entry per plotted point, not one per probe — see MeanVarianceValueObject(MeanVarianceRelation).

Author:
tesarst
  • Constructor Details

    • MeanVarianceValueObject

      public MeanVarianceValueObject(MeanVarianceRelation mvr)
      Rounded to RoundingUtils.JSON_SIGNIFICANT_DIGITS significant digits with no opt-out, as on DatasetsWebService.SimpleSVDValueObject. This is the heaviest payload on the diagnostics tab — one mean and one variance per probe, at 17 significant digits each. Measured on eid 1 (22,283 probes): 883 KB as served and 346 KB rounded, decompressed; 382.6 KB and 101.0 KB gzipped.

      Significant digits rather than decimal places matters here specifically: eid 1's variances bottom out at 5.76e-4, one order of magnitude off a 0.001 floor, so a fixed three-decimal rounding would flatten a lower-variance dataset's low end to 0.000 — and the low-variance end is the informative part of the plot.

      Copies: mvr.getMeans() is the loaded entity's own array.

      Rounded first, then thinned onto GRID_COLUMNS × GRID_ROWS. That order matters: keying the grid off the unrounded value and emitting the rounded one lets the two disagree, so a cell could keep a point whose emitted coordinates belong to a neighbour.

  • Method Details

    • getDesignElementIds

      @Nullable public Long[] getDesignElementIds()
      Reserved — Gemma's MeanVarianceRelation does not currently carry design-element ids; the UI indexes the parallel arrays positionally.
    • getDesignElementNames

      @Nullable public String[] getDesignElementNames()
      Reserved — see designElementIds.
    • getMeans

      public double[] getMeans()
      Means (typically log-CPM or normalized intensity), one per surviving point.
    • getVariances

      public double[] getVariances()
      Variances (squared SD or robust variance), parallel to means: a point is (means[i], variances[i]).
    • getFit

      Reserved — Gemma's MeanVarianceRelation does not currently expose a fit curve.
    • getSource

      @Nullable public String getSource()
      Reserved — placeholder for the producing method (e.g. "limma_voom", "edger_glmqlf", "naive"). Currently always null.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object