Class PairedDesignAnalysisTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.analysis.expression.diff.PairedDesignAnalysisTest

@ContextConfiguration public class PairedDesignAnalysisTest extends BaseTest5
A paired analysis at the analyzer level: the subject factor is in the model (its columns adjust every other factor's contrasts) but produces NO result set.

The fixture is six subjects, each carrying both a control and a treated sample, plus a tissue factor with no pairing structure. A balanced two-subject-per-cell design like the old ones would hide the distinction between "subject left out of the model" and "subject suppressed from the results", so the subject factor has one level per subject and tissue stays fully crossed.

Author:
paul
  • Constructor Details

    • PairedDesignAnalysisTest

      public PairedDesignAnalysisTest()
  • Method Details

    • blockingFactorIsModelledButNotReported

      @Test public void blockingFactorIsModelledButNotReported()
      The rule: subject columns are in the model (the treatment contrast is within-subject) but the subject factor itself yields no result set, and tissue is unaffected.
    • withoutBlockingFlagTheSubjectFactorIsReported

      @Test public void withoutBlockingFlagTheSubjectFactorIsReported()
      Positive control off the same fixture: without the blocking flag, the subject factor gets its own result set (six subject contrasts per probe), so the test above cannot pass merely because the fixture is degenerate.
    • interactionWithBlockingFactorIsRefused

      @Test public void interactionWithBlockingFactorIsRefused()
      A config assembled field-by-field (bypassing addInteractionToInclude) that asks for a subject-by-treatment interaction is refused at the analyzer, not silently reinterpreted.
    • blockingFactorNotInFactorsToIncludeIsIgnored

      @Test public void blockingFactorNotInFactorsToIncludeIsIgnored()
      A blocking factor that is not in factorsToInclude is ignored with a warning, not a crash: the columns simply never enter the model.
    • blockingFactorAsTheOnlyFactorIsRefused

      @Test public void blockingFactorAsTheOnlyFactorIsRefused()
      With only the blocking factor in the model there is nothing to report; refused up front rather than left to fail on an empty model formula.
    • mixedModelReportsTreatmentAndTissueButNotSubject

      @Test public void mixedModelReportsTreatmentAndTissueButNotSubject()
      Mixed model end to end: the subject has no columns and no result set, treatment and tissue are reported with finite p-values, and the protocol records both the blocking factor and that its correlation was estimated (a redo reads that line back).
    • fixedEffectBlockingDoesNotWriteTheEstimatedCorrelationLine

      @Test public void fixedEffectBlockingDoesNotWriteTheEstimatedCorrelationLine()
      The fixed-effect protocol does not claim a correlation was estimated.
    • mixedModelWithoutABlockingFactorIsRefused

      @Test public void mixedModelWithoutABlockingFactorIsRefused()
    • mixedModelWithTheBlockingFactorNotInTheModelIsRefused

      @Test public void mixedModelWithTheBlockingFactorNotInTheModelIsRefused()
      A blocking factor left out of factorsToInclude is a warning for the fixed-effect fit but an error for the mixed model, where silently running unblocked would report an unadjusted analysis as a mixed one.
    • mixedModelWithVoomWeightsIsRefused

      @Test public void mixedModelWithVoomWeightsIsRefused()
    • mixedModelWithTwoBlockingFactorsIsRefused

      @Test public void mixedModelWithTwoBlockingFactorsIsRefused()
    • blockingFactorAfterAnInteractionIsStillRefusedByTheAnalyzer

      @Test public void blockingFactorAfterAnInteractionIsStillRefusedByTheAnalyzer()
      Analyzer-level counterpart of the CLI check: a blocking factor cannot be set once an interaction with it is configured, whichever order the config is assembled in.