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

45 lines
1.9 KiB
Markdown
Raw Permalink 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 - reference_set 表录入说明
来源:`docs/architecture/03-genotyping-data-flow.md`
## 录入目标
`reference_set` 表示参考基因组集合,是 reference、variantset、variant 的参考侧上游。它可以关联来源 germplasm。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `reference_set` |
| Java 实体 | `ReferenceSetEntity` |
| 前置依赖 | 可选 `germplasm` |
| 下游引用 | `reference``variantset``variant` |
| API | `/brapi/v2/referencesets` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | reference set 主键 | 系统生成;导入时可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `reference_set_name` | 参考集合名称 | 用户录入 | 建议必填 |
| `assemblypui` | assembly 永久标识 | 用户录入/导入 | 可选,建议唯一 |
| `description` | 参考集合说明 | 多行文本 | 可选 |
| `is_derived` | 是否派生参考 | 开关 | 可选 |
| `md5checksum` | 校验值 | 文本 | 可选,格式提示 |
| `sourceuri` | 来源 URI | URL 输入 | 可选URL 格式校验 |
| `species_ontology_term` | 物种本体 term | 文本/本体选择器 | 可选 |
| `species_ontology_termuri` | 物种本体 URI | URL 输入 | 可选URL 格式校验 |
| `source_germplasm_id` | 来源 germplasm | Germplasm 选择器 | 可选,若填需存在 |
## 页面与交互
- 列表页展示 referenceSetName、assemblyPUI、species、sourceGermplasm、reference 数、variantset 数。
- 详情页展示 reference、variantset、variant 入口。
## 关键校验
1. 删除 reference_set 前检查 `reference``variantset``variant` 引用。
2. 若填写 `source_germplasm_id`,必须引用已存在 germplasm。
3. md5 checksum 建议做格式提示,不强行阻断历史数据。