feat(crispr): implement CRISPR-Cas detection and fusion analysis module
This commit is contained in:
122
@fix_plan.md
122
@fix_plan.md
@@ -1,113 +1,31 @@
|
||||
# BtToxin Pipeline 开发任务清单
|
||||
|
||||
## 高优先级 (P0) - 基础功能
|
||||
## 当前阶段: CRISPR-Cas 模块开发 (P0)
|
||||
|
||||
### Frontend - 国际化与导航
|
||||
### Phase 1: 基础设施与检测
|
||||
- [x] **C1.1**: 创建 `crispr_cas` 目录结构 (scripts, docs, tests)
|
||||
- [x] **C1.2**: 激活 `pixi.toml` 中的 `[feature.crispr]` 环境依赖
|
||||
- [x] **C1.3**: 实现 `crispr_cas/scripts/detect_crispr.py` (CRISPRCasFinder 包装器)
|
||||
- [x] **C1.4**: 编写检测模块单元测试 `tests/test_detect_crispr.py`
|
||||
|
||||
- [x] **F1.1**: 安装并配置 vue-i18n
|
||||
- [x] **F1.2**: 创建 `locales/zh.json` 和 `locales/en.json` 翻译文件
|
||||
- [x] **F1.3**: 在 App.vue 添加完整导航栏(首页 | 关于 | 提交任务 | 任务状态 | 工具说明)
|
||||
- [x] **F1.4**: 添加中英文切换按钮(全局,页面显眼处)
|
||||
- [x] **F1.5**: 将所有硬编码文本替换为 i18n 变量
|
||||
### Phase 2: 融合分析 (Fusion Analysis)
|
||||
- [x] **C2.1**: 实现 `crispr_cas/scripts/fusion_analysis.py` (Spacer-Toxin 关联)
|
||||
- [x] **C2.2**: 实现基因组位置映射逻辑
|
||||
- [x] **C2.3**: 编写融合分析测试 `tests/test_fusion_analysis.py`
|
||||
|
||||
### Frontend - 上传功能增强
|
||||
### Phase 3: 整合与可视化
|
||||
- [x] **C3.1**: 修改 `bttoxin_shoter.py` 集成 CRISPR 评分参数
|
||||
- [x] **C3.2**: 更新 `plot_shotter.py` 添加 CRISPR 可视化面板
|
||||
- [ ] **C3.3**: 更新 API 支持 CRISPR 参数输入 (Backend pending)
|
||||
|
||||
- [x] **F2.1**: 支持 `.fna` / `.fa` 基因组文件 和 `.faa` / `.fasta` 蛋白序列文件
|
||||
- [x] **F2.2**: 单文件上传限制(每次只能上传 1 个文件)
|
||||
- [x] **F2.3**: 基因组和蛋白序列互斥(不能同时上传)
|
||||
- [x] **F2.4**: 添加悬浮提示说明(文件类型要求、格式说明)
|
||||
- [x] **F2.5**: 表单验证 - 不符合条件时弹出错误提示
|
||||
## 已完成 (上一阶段)
|
||||
|
||||
### Frontend - 任务状态页面增强
|
||||
- [x] **2025-01-14**: Docker 部署修复与上线 (Traefik/Postgres/Redis)
|
||||
- [x] **2025-01-14**: 后端国际化 (i18n)
|
||||
- [x] **2025-01-14**: 文档更新 (AGENTS.md, DOCKER_DEPLOYMENT.md)
|
||||
- [x] **2025-01-14**: 基础功能 (F1-F5, B1-B3)
|
||||
|
||||
- [x] **F3.1**: 区分运行中 (running) 和排队中 (pending/queued) 状态
|
||||
- [x] **F3.2**: 排队状态显示当前排队序号(如 "排队中:第 3 位")
|
||||
- [x] **F3.3**: 运行状态显示进度条
|
||||
- [x] **F3.4**: 更新 PIPELINE_STAGES 支持蛋白序列流程
|
||||
|
||||
### Frontend - 关于页面
|
||||
|
||||
- [x] **F4.1**: 创建 AboutView.vue
|
||||
- [x] **F4.2**: 介绍 BtToxin Pipeline 功能
|
||||
- [x] **F4.3**: 展示示例结果截图(预留位置)
|
||||
- [x] **F4.4**: 注意事项和限制说明
|
||||
|
||||
### Frontend - 工具说明页面
|
||||
|
||||
- [x] **F5.1**: 创建 ToolInfoView.vue(重命名为"工具说明")
|
||||
- [x] **F5.2**: 介绍 BtToxin_Shoter 的评估原理(不说数学公式)
|
||||
- [x] **F5.3**: 说明识别流程和阈值设定依据
|
||||
- [x] **F5.4**: 不提及 BtToxin_Digger
|
||||
|
||||
### Backend - FastAPI 重构
|
||||
|
||||
- [x] **B1.1**: 创建 FastAPI 后端 (`backend/app/main.py`)
|
||||
- [x] **B1.2**: 实现任务创建 API (`POST /api/v1/jobs/create`)
|
||||
- [x] **B1.3**: 实现任务状态查询 API (`GET /api/v1/jobs/{job_id}`)
|
||||
- [x] **B1.4**: 实现结果下载 API (`GET /api/v1/results/{job_id}/download`)
|
||||
- [x] **B1.5**: 实现任务删除 API (`DELETE /api/v1/results/{job_id}`)
|
||||
|
||||
### Backend - 并发控制
|
||||
|
||||
- [x] **B2.1**: 实现 16 并发限制(使用 ConcurrencyManager + Redis)
|
||||
- [x] **B2.2**: 实现任务排队机制(QUEUED 状态)
|
||||
- [x] **B2.3**: API 返回排队位置或预计等待时间
|
||||
- [x] **B2.4**: Redis 存储任务状态和队列信息
|
||||
|
||||
### Backend - 多格式支持
|
||||
|
||||
- [x] **B3.1**: 自动检测上传文件类型(.fna/.fa/.faa/.fasta)
|
||||
- [x] **B3.2**: 根据文件类型设置 sequence_type (nucl/prot)
|
||||
- [x] **B3.3**: 修改 pipeline 脚本支持蛋白序列输入
|
||||
|
||||
## 中优先级 (P1) - 增强功能
|
||||
|
||||
### CRISPR-Cas 预留
|
||||
|
||||
- [x] **C1.1**: 创建 `crispr_cas/` 目录结构(文档已准备,目录待实现时创建)
|
||||
- [x] **C1.2**: 在 pixi.toml 添加 [feature.crispr] 环境
|
||||
- [x] **C1.3**: 在 bttoxin_shoter.py 预留 CRISPR 权重参数和融合函数(已文档化)
|
||||
- [x] **C1.4**: 文档说明后续如何实现 CRISPR 分析
|
||||
|
||||
### 后端国际化
|
||||
|
||||
- [x] **B4.1**: API 返回文本支持多语言
|
||||
- [x] **B4.2**: 错误消息国际化
|
||||
|
||||
### 前端样式优化
|
||||
|
||||
- [x] **F6.1**: 使用 ui-ux-pro-max skill 优化页面风格
|
||||
- [x] **F6.2**: 参考 Apple 风格设计(配色、间距、动画)
|
||||
- [x] **F6.3**: 响应式布局优化
|
||||
|
||||
## 低优先级 (P2) - 部署与文档
|
||||
|
||||
### Docker 部署
|
||||
|
||||
- [x] **D1.1**: 创建 FastAPI 专用 Dockerfile
|
||||
- [x] **D1.2**: 更新 docker-compose.yml
|
||||
- [x] **D1.3**: 配置 Traefik labels
|
||||
- [x] **D1.4**: 测试域名访问 (bttiaw.hzau.edu.cn) ✅ Domain accessible, Traefik routing OK
|
||||
|
||||
### 文档
|
||||
|
||||
- [x] **Doc1**: 更新 AGENTS.md
|
||||
- [x] **Doc2**: 编写部署文档
|
||||
|
||||
## 已完成
|
||||
|
||||
- [x] 初始版本提交 - 简化架构 + 轮询改造
|
||||
- [x] **2025-01-13 #1**: Backend API enhancements - tasks router, download/delete endpoints, concurrency control, queue management
|
||||
- [x] **2025-01-13 #2**: Pipeline script enhancement - protein file (.faa) support with automatic type detection
|
||||
- [x] **2025-01-13 #3**: Docker deployment - SPA static file serving, Traefik labels, docker-compose configuration
|
||||
- [x] **2025-01-13 #4**: CRISPR-Cas reservation - infrastructure prepared, implementation plan documented
|
||||
- [x] **2025-01-14 #5**: UI/UX Phase 1 - Apple-inspired design system with glassmorphism navbar, animated hero section, enhanced feature cards, comprehensive design tokens
|
||||
- [x] **2025-01-14 #6**: Domain testing - Verified bttiaw.hzau.edu.cn is accessible via Traefik (HTTP/2, SSL working), returns 404 because production container not deployed yet
|
||||
- [x] **2025-01-14 #7**: Deployment attempt - Identified Docker registry configuration issue (docker.fnnas.com returning 401)
|
||||
- [x] **2025-01-14 #8**: Full Deployment Success - Fixed all build/runtime errors and successfully deployed `bttoxin-pipeline` container.
|
||||
- [x] **2025-01-14 #9**: Backend Internationalization - Implemented i18n infrastructure and localized API responses.
|
||||
- [x] **2025-01-14 #10**: Documentation Update - Updated AGENTS.md and DOCKER_DEPLOYMENT.md with new architecture (Postgres/Redis) and deployment steps.
|
||||
- [x] **2025-01-14 #11**: Network Fix - Switched Docker network from `traefik-network` to `frontend` to ensure connectivity with main Traefik proxy.
|
||||
## 参考文档
|
||||
|
||||
## 参考文档
|
||||
|
||||
|
||||
Reference in New Issue
Block a user