# BtToxin Pipeline 开发任务清单 ## 当前阶段: CRISPR-Cas 模块开发 (P0) ### 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` ### 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` ### Phase 3: 整合与可视化 - [x] **C3.1**: 修改 `bttoxin_shoter.py` 集成 CRISPR 评分参数 - [x] **C3.2**: 更新 `plot_shotter.py` 添加 CRISPR 可视化面板 - [x] **C3.3**: 更新 API 支持 CRISPR 参数输入 (Backend updated) ## 下一阶段: 前端 CRISPR 集成 (P0) ### Phase 4: 前端界面更新 - [x] **F4.1**: 在 `TaskSubmitView.vue` 添加 CRISPR 参数开关和权重滑块 - [x] **F4.2**: 更新 `TaskMonitorView.vue` 展示 CRISPR 分析状态 - [x] **F4.3**: 在结果页面展示 CRISPR 融合分析结果 (UI参数展示已完成,结果展示待后端集成) ## 后续计划: 任务执行集成 (P1) - [x] **E1.1**: 更新 `tasks.py` 调用 `detect_crispr.py` - [x] **E1.2**: 更新 `tasks.py` 调用 `fusion_analysis.py` - [x] **E1.3**: 更新 `bttoxin_shoter.py` 使用 CRISPR 结果 (Worker integration complete) ## 已完成 (上一阶段) - [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) ## 参考文档 ## 参考文档 - Shotter 算法原理: `docs/shotter_math_full_zh_typora.md` - CRISPR 实现计划: `docs/CRISPR_IMPLEMENTATION_PLAN.md` - UI/UX 设计计划: `docs/UI_UX_DESIGN_PLAN.md` - 现有前端代码: `frontend/src/` - Pixi 环境配置: `pixi.toml` ## 部署状态 ### 当前状态 (2025-01-14) - **Traefik**: ✅ Running (traefik:v3.5.3) - **Domain**: ✅ Configured (bttiaw.hzau.edu.cn) - **SSL/HTTPS**: ✅ Working (self-signed cert) - **Routing**: ✅ Traefik routing to domain OK - **Docker Build**: ✅ **SUCCESS** - Image built and service running - **Health Check**: ✅ Passed (internal curl test) ### 部署问题 (已解决) **Fixed**: - Docker registry 401 error: Switched to `docker.m.daocloud.io` - Frontend build errors: Fixed missing icons and types - Backend dependencies: Added missing python packages - Import errors: Fixed missing classes in backend models ### 部署步骤 **Standard Deployment** ```bash # Build and start services docker compose -f docker/compose/docker-compose.traefik.yml up -d --build # View logs docker logs -f bttoxin-pipeline ``` ### 完整部署流程 Once registry issue is resolved: 1. Build production image: `docker build -f docker/dockerfiles/Dockerfile.traefik -t bttoxin-prod .` 2. Deploy with docker-compose: `docker-compose -f docker/compose/docker-compose.traefik.yml up -d` 3. Verify deployment: `curl -k https://bttiaw.hzau.edu.cn` 4. Check logs: `docker logs bttoxin-pipeline`