Class GSE17183RealDesignFitTest

java.lang.Object
ubic.gemma.core.util.math.linearmodels.GSE17183RealDesignFitTest

public class GSE17183RealDesignFitTest extends Object
Both blocking modes (fixed-effect paired, mixed-model correlation) on a REAL Gemma experiment design: GSE17183 (eid 2877), "Hepatic gene expression before and during interferon and ribavirin combination therapy". 30 patients biopsied before and during therapy, in subsets of three cell types (liver bulk, laser-capture hepatocytes, laser-capture portal tracts) -- 108 samples, genuinely unbalanced.

The fixture is a 51-probe slice of the real processed data (gse17183-expmat-50probes.txt) and a design derived from the real Gemma design file data/analysis/preprocess/2877_GSE17183_expdesign.data.txt (gse17183-derived-design.txt: subject recovered from the BioMaterial names, treatment mapped from reference_substance_role/ribavirin|interferon, organismPart from the Gemma factor values). The R reference fits live in gse17183-golden-gen.R (limma lmFit+eBayes for the paired model, duplicateCorrelation + gls.series + eBayes for the mixed model).

This fixture exercises the FINITE dfPrior path (df.prior = 4.378, heterogeneous residual variance) that the synthetic fixtures cannot reach, on a design where each subject carries 2-6 samples of differing cell types.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Real design, mixed model: consensus correlation against R's duplicateCorrelation (0.118996214439146).
    void
    Real design, finite dfPrior path: heterogeneous residual variance across these real probes gives df.prior = 4.3781971271239 and s2.prior = 0.365068365815815 -- the squeezed variances then depend on them, so the moderated t on a second probe pins the whole squeezeVar chain.
    void
    The treatment coefficient itself (unmoderated): MX1 pre-vs-during difference.
    void
    Real design, mixed model at R's fixed rho: GLS coefficients and sigma must match R's gls.series to machine precision (MX1: [8.398299988694008, -1.254954433138440, -0.414941666666669, 1.860572222222223], sigma 1.20186797877026); eBayes df.total = 107.956773066229 and the moderated treatment t = 8.68790334128985 pin the moderation on the whitened fit.
    void
    Real paired design, limma reference: treatment coefficient (during therapy vs pre) on MX1 -- t = 9.48145358327541, p = 1.07157318672072e-14 after eBayes; sigma = 1.03878755411725.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GSE17183RealDesignFitTest

      public GSE17183RealDesignFitTest()
  • Method Details

    • pairedTreatmentEffectMatchesLimmaOnRealData

      @Test public void pairedTreatmentEffectMatchesLimmaOnRealData() throws Exception
      Real paired design, limma reference: treatment coefficient (during therapy vs pre) on MX1 -- t = 9.48145358327541, p = 1.07157318672072e-14 after eBayes; sigma = 1.03878755411725. The treatment effect on interferon-response genes is the real biology the design recovers.
      Throws:
      Exception
    • flatProbeMatchesLimmaOnRealData

      @Test public void flatProbeMatchesLimmaOnRealData() throws Exception
      The treatment coefficient itself (unmoderated): MX1 pre-vs-during difference. R: the coefficient of treatmentduring_interferon_ribavirin for probe_0 (1255_g_at) is asserted through the flat probe; for MX1 read off lmFit directly -- the golden script prints coefficients for the MIXED model and sigma/t/p here, so the unmoderated coefficient is pinned via probe 1255_g_at (a flat probe: t = 0.187164440996117, p = 0.852009273347252 moderated).
      Throws:
      Exception
    • finiteDfPriorModerationMatchesLimmaOnRealData

      @Test public void finiteDfPriorModerationMatchesLimmaOnRealData() throws Exception
      Real design, finite dfPrior path: heterogeneous residual variance across these real probes gives df.prior = 4.3781971271239 and s2.prior = 0.365068365815815 -- the squeezed variances then depend on them, so the moderated t on a second probe pins the whole squeezeVar chain.
      Throws:
      Exception
    • consensusCorrelationMatchesLimmaOnRealData

      @Test public void consensusCorrelationMatchesLimmaOnRealData() throws Exception
      Real design, mixed model: consensus correlation against R's duplicateCorrelation (0.118996214439146). Tolerance as in MixedModelFitTest: partially unbalanced blocks give QtZ repeated singular values, so the within-group basis is implementation-defined.
      Throws:
      Exception
    • mixedGlsAtFixedRhoMatchesLimmaOnRealData

      @Test public void mixedGlsAtFixedRhoMatchesLimmaOnRealData() throws Exception
      Real design, mixed model at R's fixed rho: GLS coefficients and sigma must match R's gls.series to machine precision (MX1: [8.398299988694008, -1.254954433138440, -0.414941666666669, 1.860572222222223], sigma 1.20186797877026); eBayes df.total = 107.956773066229 and the moderated treatment t = 8.68790334128985 pin the moderation on the whitened fit.
      Throws:
      Exception