Files
brapi-java/docs/dev/03-genotyping/06-variantset.md
2026-05-28 15:51:39 +08:00

47 lines
1.9 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 - variantset 表录入说明
来源:`docs/architecture/03-genotyping-data-flow.md`
## 录入目标
`variantset` 表示一批 variant 的集合通常对应一次测序、芯片、DArTSeq 或某个 study 下的位点集合。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `variantset` |
| Java 实体 | `VariantSetEntity` |
| 前置依赖 | `reference_set``study` |
| 下游引用 | `variant``callset_variant_sets``variantset_analysis``variantset_format` |
| API | `/brapi/v2/variantsets` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | variantset 主键 | 系统生成;导入时可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `variant_set_name` | 变异集合名称 | 用户录入/导入 | 建议必填 |
| `reference_set_id` | 参考基因组集合 | ReferenceSet 选择器 | 建议必选,若填需存在 |
| `study_id` | 所属 study | Study 选择器 | 可选,若填需存在 |
## 页面与交互
- VariantSet 列表页支持按 referenceSet、study、variantSetName 查询。
- 详情页展示 variants、callsets、analysis、available formats。
- 从 Study 工作台创建时默认带出 `study_id`
- **本版本不做**:单条删除、批量删除;放到下一版本实现。
## 关键校验
1. `reference_set_id` 与下属 `variant.reference_set_id` 应保持一致。
2. 导入大型 variantset 时建议先建 variantset再异步导入 variants 和 calls。
3. **下一版本再做**:删除 variantset 前检查 `variant``callset_variant_sets``variantset_analysis``variantset_format`(含单条删除与批量删除)。
## 开发状态
**已完成**2026-05-28列表查询、新增、编辑、详情。
**下一版本**:单条删除、批量删除。