BatchLens Bio / Design audit / 0.1.0

Can this design support
your comparison?

A metadata-only check of experimental units, batch coverage and contrast estimability. No expression data are fitted or corrected.

SYNTHETIC confounded-time

6Declared experimental units
6Samples
0Linked cells / spots
Metadata and the declared additive model only. This audit does not establish power, independence, randomization, absence of unmeasured confounding, or causality.

Your requested comparisons

NON_ESTIMABLE

D7_vs_D0

time: D7 − D0

The requested effect cannot be uniquely separated from the other declared terms. Inspect the matrix dependencies below.

Findings 3

CRITICAL BL-CONTRAST-001

D7_vs_D0: the requested contrast is not estimable in this model.

Discuss crossed sampling or a revised scientific question; correction cannot supply missing design information.

Evidence references

JSON pointers in result.json:

/contrasts/0
/matrix_diagnostics/dependencies
WARNING BL-COVER-001

Some target-by-batch combinations have no samples.

Review coverage. An empty combination alone is not non-estimability.

Evidence references

JSON pointers in result.json:

/coverage
WARNING BL-DESIGN-001

The declared design matrix is rank deficient.

Inspect the dependencies and each contrast separately; do not drop batch blindly.

Evidence references

JSON pointers in result.json:

/matrix_diagnostics/dependencies

Target × batch coverage

Counts use samples and distinct declared units. Empty combinations need review; they do not alone prove non-estimability.

Batch variableBatchTargetSamplesUnits
runAD033
runBD000
runAD700
runBD733

Experimental-unit structure

Repeated samples and extra cells do not create additional experimental units.

Unit aliasSamplesTarget levels
unit-00011D0
unit-00021D0
unit-00031D0
unit-00041D7
unit-00051D7
unit-00061D7

Declared model & numerical evidence

Intercept + time + run

Rank 2 of 3 columns · 6 design rows · residual row degrees of freedom 4

Encoding and column-dependency evidence
Column indexVariableLevel / kind
0Interceptintercept
1timeD7
2runB

Each dependency vector below follows that column order and satisfies Xv ≈ 0. Individual contrasts are checked against the row space.

[[-0.0, 1.0, -1.0]]

Rank tolerance: 4.2638060825584685e-15

D7_vs_D0 residual: 0.7071067811865475 / tolerance 1e-10

Complete declared configuration
{
  "adjust_for": [
    "run"
  ],
  "contrasts": [
    {
      "denominator": "D0",
      "id": "D7_vs_D0",
      "numerator": "D7"
    }
  ],
  "design_mode": "independent",
  "sample_id": "sample_id",
  "schema_version": "1.0",
  "target": "time",
  "unit_id": "unit_id",
  "variables": {
    "run": {
      "levels": [
        "A",
        "B"
      ],
      "reference": "A",
      "role": "batch",
      "type": "categorical"
    },
    "time": {
      "levels": [
        "D0",
        "D7"
      ],
      "reference": "D0",
      "role": "target",
      "type": "categorical"
    }
  }
}