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

46 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 - genome_map 表录入说明
来源:`docs/architecture/03-genotyping-data-flow.md`
## 录入目标
`genome_map` 表示遗传图谱,用于组织 linkage group并通过 marker_position 将 variant 放到图谱坐标上。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `genome_map` |
| Java 实体 | `GenomeMapEntity` |
| 前置依赖 | `crop`,可关联 `study` |
| 下游引用 | `linkageGroup` / `linkage_group` |
| API | `/brapi/v2/maps` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | map 主键 | 系统生成;导入时可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `map_name` | 图谱名称 | 用户录入 | 建议必填 |
| `mappui` | map 永久标识 | 用户录入/导入 | 可选,建议唯一 |
| `crop_id` | 所属作物 | Crop 选择器 | 可选,若填需存在 |
| `scientific_name` | 学名 | 文本 | 可选 |
| `type` | 图谱类型 | 下拉/文本 | 可选 |
| `unit` | 图谱单位,如 cM | 文本/下拉 | 可选 |
| `published_date` | 发表日期 | 日期选择器 | 可选 |
| `documentationurl` | 文档链接 | URL 输入 | 可选URL 格式校验 |
| `comments` | 备注 | 多行文本 | 可选 |
## 页面与交互
- GenomeMap 列表页支持按 crop、mapName、type 查询。
- 详情页展示 linkage groups 和 marker positions。
- 可通过图谱详情批量导入 linkage group 与 marker position。
## 关键校验
1. 删除 genome_map 前检查 linkage group 引用。
2. 若关联 study应检查 study 的 crop 与 map 的 crop 一致。
3. `unit` 应与 marker_position 的 position 语义保持一致。