Files
brapi-java/docs/dev/03-genotyping/09-allele_call.md
2026-05-28 11:56:17 +08:00

43 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 03 Genotyping - allele_call 表录入说明
来源:`docs/architecture/03-genotyping-data-flow.md`
## 录入目标
`allele_call` 是最终 genotype 调用结果。业务上它就是 Call一条记录表示某个 sample/callset 在某个 variant 上的 genotype、read depth、likelihood 等结果。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `allele_call` |
| Java 实体 | `CallEntity` |
| 前置依赖 | `callset``variant` |
| 下游引用 | 无 |
| API | `/brapi/v2/calls` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | call 主键 | 系统生成;导入时可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `call_set_id` | 所属 callset | CallSet 选择器/导入 | 必选,必须存在 |
| `variant_id` | 对应 variant | Variant 选择器/导入 | 必选,必须存在 |
| `genotype` | genotype 值,如 0/1、A/T | 文本/导入 | 建议必填 |
| `read_depth` | 测序深度 | 数字输入/导入 | 可选,非负 |
| `genotype_likelihood` | genotype likelihood | 数字输入/导入 | 可选 |
| `phase_set` | phase set | 文本/导入 | 可选 |
## 页面与交互
- 通常不做逐条手工录入,主要通过 VCF/HapMap/矩阵文件导入。
- 列表页支持按 callset、sample、variantset、variant 查询。
- 在 Variant 详情页可查看该位点下的 calls在 Sample/CallSet 详情页可查看该样本的 calls。
## 关键校验
1. `call_set_id``variant_id` 必须存在。
2. 同一 callset 对同一 variant 不应重复。
3. `allele_call` 不应直接承担 variant 定义字段;位点信息应来自 `variant`