BatchLens Bio · 0.3.0 · 研究设计复核

先看清设计,再解释差异。

核对实验单位、批次分配及你明确指定的比较。不拟合或校正表达数据。

合成示例 Confounded allocation; original synthetic cell metadata

6声明的生物学单位
6样本
920关联细胞 / 空间点位
仅依据元数据和声明的加性模型。不能证明统计功效、独立性、随机化、无未测量混杂或因果关系。

你指定的比较

不可估计 NON_ESTIMABLE

selected-comparison

condition: regeneration − control

该效应无法与模型中其他项的影响唯一分开。

复核提示 7

优先复核 BL-CONTRAST-001

指定比较在当前模型下不可估计 · selected-comparison

考虑补充交叉分配的样本,或调整科学问题。批次校正无法补回设计中不存在的信息。

查看具体证据
[
  {
    "denominator": "control",
    "id": "selected-comparison",
    "numerator": "regeneration",
    "row_space_residual": 0.7071067811865474,
    "status": "NON_ESTIMABLE",
    "tolerance": 1e-10,
    "vector": [
      0.0,
      1.0,
      0.0
    ]
  },
  [
    [
      -0.0,
      1.0,
      -1.0
    ]
  ]
]

result.json 中的证据位置:

/contrasts/0
/matrix_diagnostics/dependencies
需要关注 BL-CELL-001

达到细胞数阈值的供体不足 · Hepatocyte / control

复核供体覆盖。此计数在每个条件及细胞类型内合并同一供体的样本;阈值是复核提示,不是功效检验。

查看具体证据
[
  {
    "cell_type": "Hepatocyte",
    "cells": 220,
    "dominance_threshold": 0.6,
    "eligible_units": 3,
    "largest_unit_share": 0.9090909090909091,
    "min_cells": 20,
    "min_units": 3,
    "observed_units": 3,
    "supported_units": 1,
    "target_level": "control"
  }
]

result.json 中的证据位置:

/cell_support/2
需要关注 BL-CELL-001

达到细胞数阈值的供体不足 · Hepatocyte / regeneration

复核供体覆盖。此计数在每个条件及细胞类型内合并同一供体的样本;阈值是复核提示,不是功效检验。

查看具体证据
[
  {
    "cell_type": "Hepatocyte",
    "cells": 220,
    "dominance_threshold": 0.6,
    "eligible_units": 3,
    "largest_unit_share": 0.9090909090909091,
    "min_cells": 20,
    "min_units": 3,
    "observed_units": 3,
    "supported_units": 1,
    "target_level": "regeneration"
  }
]

result.json 中的证据位置:

/cell_support/3
需要关注 BL-CELL-002

单个供体占据了较高比例的细胞 · Hepatocyte / control

检查采样和供体贡献,不要据此自动删除供体。

查看具体证据
[
  {
    "cell_type": "Hepatocyte",
    "cells": 220,
    "dominance_threshold": 0.6,
    "eligible_units": 3,
    "largest_unit_share": 0.9090909090909091,
    "min_cells": 20,
    "min_units": 3,
    "observed_units": 3,
    "supported_units": 1,
    "target_level": "control"
  }
]

result.json 中的证据位置:

/cell_support/2
需要关注 BL-CELL-002

单个供体占据了较高比例的细胞 · Hepatocyte / regeneration

检查采样和供体贡献,不要据此自动删除供体。

查看具体证据
[
  {
    "cell_type": "Hepatocyte",
    "cells": 220,
    "dominance_threshold": 0.6,
    "eligible_units": 3,
    "largest_unit_share": 0.9090909090909091,
    "min_cells": 20,
    "min_units": 3,
    "observed_units": 3,
    "supported_units": 1,
    "target_level": "regeneration"
  }
]

result.json 中的证据位置:

/cell_support/3
需要关注 BL-COVER-001

部分条件与批次组合没有样本

检查分配覆盖;空组合本身不等于指定比较不可估计。

查看具体证据
[
  [
    {
      "batch_level": "B1",
      "batch_variable": "batch",
      "samples": 3,
      "target_level": "control",
      "units": 3
    },
    {
      "batch_level": "B2",
      "batch_variable": "batch",
      "samples": 0,
      "target_level": "control",
      "units": 0
    },
    {
      "batch_level": "B1",
      "batch_variable": "batch",
      "samples": 0,
      "target_level": "regeneration",
      "units": 0
    },
    {
      "batch_level": "B2",
      "batch_variable": "batch",
      "samples": 3,
      "target_level": "regeneration",
      "units": 3
    }
  ]
]

result.json 中的证据位置:

/coverage
需要关注 BL-DESIGN-001

设计矩阵存在冗余列

检查依赖关系及每个具体比较。矩阵秩亏不等于所有比较不可估计,不要直接删除批次变量。

查看具体证据
[
  [
    [
      -0.0,
      1.0,
      -1.0
    ]
  ]
]

result.json 中的证据位置:

/matrix_diagnostics/dependencies

条件 × 批次分配

分别统计样本数与独立声明单位数。空组合本身不等于指定比较不可估计。

批次变量批次条件样本单位
batchB1control33
batchB2control00
batchB1regeneration00
batchB2regeneration33

细胞类型内的供体覆盖

在每个条件、细胞类型内合并同一供体的样本计数。阈值用于提示复核,不是功效检验;没有拟合亚组模型。

最少供体数: 3每供体最少细胞数: 20占比阈值: 60%

细胞类型条件细胞数样本表中的供体观测供体达到阈值的供体最高供体占比
Endothelialcontrol12033333.3%
Endothelialregeneration12033333.3%
Hepatocytecontrol22033190.9%
Hepatocyteregeneration22033190.9%
Kupffercontrol12033333.3%
Kupfferregeneration12033333.3%

实验单位与重复结构

重复样本和更多细胞不会增加独立实验单位。

单位别名样本数条件
unit-00011control
unit-00021control
unit-00031control
unit-00041regeneration
unit-00051regeneration
unit-00061regeneration

细胞类型 / 区域汇总

注释类别标签条件细胞 / 点位样本单位
cell_typeEndothelialcontrol12033
cell_typeEndothelialregeneration12033
cell_typeHepatocytecontrol22033
cell_typeHepatocyteregeneration22033
cell_typeKupffercontrol12033
cell_typeKupfferregeneration12033

声明模型与数值证据

Intercept + condition + batch

秩 2 / 3 列 · 6 设计行 · 剩余行自由度 4

变量编码与列依赖
序号变量水平 / 类型
0Interceptintercept
1conditionregeneration
2batchB2

每个依赖向量对应上述列顺序,并满足 Xv ≈ 0。对每个比较分别检查其是否位于行空间。

[[-0.0, 1.0, -1.0]]

秩容差: 4.2638060825584685e-15

selected-comparison: 残差 0.7071067811865474 / 容差 1e-10

快速检查与高级模式使用同一个比较检查引擎,仅转换已确认的列。

输入映射与来源指纹
{
  "cell_id_uniqueness": "checked",
  "column_mapping": {
    "batch": "batch",
    "cell_id": "cell_id",
    "cell_type": "cell_type",
    "sample": "sample",
    "target": "condition",
    "timepoint": null,
    "unit": "donor"
  },
  "mode": "quick",
  "rows": 920,
  "source_sha256": "24dd5c13d4c8688c847206e9fda8e0840def886a359452a6e33033a51ae9ba6a"
}
完整设计配置
{
  "adjust_for": [
    "batch"
  ],
  "cell_coverage": {
    "dominance": 0.6,
    "min_cells": 20,
    "min_units": 3
  },
  "contrasts": [
    {
      "denominator": "control",
      "id": "selected-comparison",
      "numerator": "regeneration"
    }
  ],
  "design_mode": "independent",
  "sample_id": "sample_id",
  "schema_version": "1.0",
  "target": "condition",
  "unit_id": "unit_id",
  "variables": {
    "batch": {
      "levels": [
        "B1",
        "B2"
      ],
      "reference": "B1",
      "role": "batch",
      "type": "categorical"
    },
    "condition": {
      "levels": [
        "control",
        "regeneration"
      ],
      "reference": "control",
      "role": "target",
      "type": "categorical"
    }
  }
}