Class DiffExVectorOwnerTest

java.lang.Object
ubic.gemma.persistence.service.expression.bioAssayData.DiffExVectorOwnerTest

public class DiffExVectorOwnerTest extends Object
Which id the diff-ex vectors are matched on.

The defect this pins

GET /datasets/{id}/expressions/differential?diffExSet=… answered 200 with an empty geneExpressionLevels for EVERY result set belonging to a subset analysis — reported by UIB on 2026-09-16 against GSE239820 (dataset 32294, subset 32662, result sets 573163/573164/573169), where /resultSets/{id} served the same statistics with probes, genes and p-values.

Cause: CachedProcessedExpressionDataVectorServiceImpl.sliceSubSet stamps each sliced vector with an ExpressionExperimentSubsetValueObject, so the vector carries the SUBSET's id while the matcher compared it to the id of the dataset in the PATH. Every vector was skipped. An empty 200 is indistinguishable from "no significant genes", which is why this sat unnoticed.

Reflection rather than a Spring context: the resolver is static, private and has no collaborators, so a context would make a fast test slow and prove less.

  • Constructor Details

    • DiffExVectorOwnerTest

      public DiffExVectorOwnerTest()
  • Method Details

    • testWholeExperimentAnalysisMatchesOnTheExperimentId

      @Test public void testWholeExperimentAnalysisMatchesOnTheExperimentId() throws Exception
      A whole-experiment analysis: the vectors carry the experiment's own id, as before.
      Throws:
      Exception
    • testSubsetAnalysisMatchesOnTheSubsetId

      @Test public void testSubsetAnalysisMatchesOnTheSubsetId() throws Exception
      🛑 The regression: a subset analysis must match on the SUBSET's id, not the parent's.
      Throws:
      Exception
    • testAForeignSubsetDoesNotResolve

      @Test public void testAForeignSubsetDoesNotResolve() throws Exception
      A result set belonging to somebody else's dataset resolves to nothing, rather than to the caller's.
      Throws:
      Exception
    • testASubsetWithNoSourceExperimentDoesNotResolve

      @Test public void testASubsetWithNoSourceExperimentDoesNotResolve() throws Exception
      A subset with no source experiment is not silently treated as the caller's.
      Throws:
      Exception