Mouse Colony Planner
Calculate timelines and cage numbers required for transgenic mouse breeding to optimize breeding costs.
Functions
- - Timeline Calculation: Calculate time required for each stage based on breeding scheme
- Cage Planning: Estimate cage numbers needed for experiments
- Cost Estimation: Calculate total breeding costs (cage fees, husbandry fees, genotyping fees, etc.)
Usage
Command Line
CODEBLOCK0
Parameters
| Parameter | Description | Default |
|---|
| INLINECODE0 | Breeding scheme: heterozygote, homozygote, INLINECODE3 | Required |
| INLINECODE4 |
Starting number of females | Required |
|
--males | Starting number of males | Required |
|
--gestation | Gestation period (days) | 21 |
|
--weaning | Weaning age (days) | 21 |
|
--sexual-maturity | Sexual maturity age (days) | 42 |
|
--cage-capacity | Maximum cage capacity | 5 |
|
--cage-cost | Cage cost per day (CNY) | 3.0 |
|
--genotyping-cost | Genotyping cost per mouse (CNY) | 15.0 |
|
--target-pups | Target number of specific genotype mice | 10 |
Breeding Scheme Descriptions
- 1. heterozygote (Heterozygote breeding): Heterozygote x Wild type → 50% Heterozygotes
- homozygote (Homozygote breeding): Heterozygote x Heterozygote → 25% Homozygotes
- conditional (Conditional knockout): Requires two-step breeding, introducing Cre/loxp system
Examples
CODEBLOCK1
Output
- - Timeline for each stage
- Cage numbers required at each stage
- Estimated total cost
- Breeding flowchart
Risk Assessment
| Risk Indicator | Assessment | Level |
|---|
| Code Execution | Python/R scripts executed locally | Medium |
| Network Access |
No external API calls | Low |
| File System Access | Read input files, write output files | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Output files saved to workspace | Low |
Security Checklist
- - [ ] No hardcoded credentials or API keys
- [ ] No unauthorized file system access (../)
- [ ] Output does not expose sensitive information
- [ ] Prompt injection protections in place
- [ ] Input file paths validated (no ../ traversal)
- [ ] Output directory restricted to workspace
- [ ] Script execution in sandboxed environment
- [ ] Error messages sanitized (no stack traces exposed)
- [ ] Dependencies audited
Prerequisites
CODEBLOCK2
Evaluation Criteria
Success Metrics
- - [ ] Successfully executes main functionality
- [ ] Output meets quality standards
- [ ] Handles edge cases gracefully
- [ ] Performance is acceptable
Test Cases
- 1. Basic Functionality: Standard input → Expected output
- Edge Case: Invalid input → Graceful error handling
- Performance: Large dataset → Acceptable processing time
Lifecycle Status
- - Current Stage: Draft
- Next Review Date: 2026-03-06
- Known Issues: None
- Planned Improvements:
- Performance optimization
- Additional feature support
小鼠群体规划器
计算转基因小鼠繁殖所需的时间线和笼位数,以优化繁殖成本。
功能
- - 时间线计算:根据繁殖方案计算各阶段所需时间
- 笼位规划:估算实验所需笼位数
- 成本估算:计算总繁殖成本(笼位费、饲养费、基因分型费等)
使用方法
命令行
bash
python scripts/main.py --scheme <繁殖方案> --females <雌鼠数量> --males <雄鼠数量> [选项]
参数
| 参数 | 说明 | 默认值 |
|---|
| --scheme | 繁殖方案:heterozygote(杂合子)、homozygote(纯合子)、conditional(条件性) | 必填 |
| --females |
起始雌鼠数量 | 必填 |
| --males | 起始雄鼠数量 | 必填 |
| --gestation | 妊娠期(天) | 21 |
| --weaning | 断奶日龄(天) | 21 |
| --sexual-maturity | 性成熟日龄(天) | 42 |
| --cage-capacity | 最大笼位容量 | 5 |
| --cage-cost | 每日笼位费(元) | 3.0 |
| --genotyping-cost | 每只小鼠基因分型费(元) | 15.0 |
| --target-pups | 目标特定基因型小鼠数量 | 10 |
繁殖方案说明
- 1. heterozygote(杂合子繁殖):杂合子 × 野生型 → 50% 杂合子
- homozygote(纯合子繁殖):杂合子 × 杂合子 → 25% 纯合子
- conditional(条件性基因敲除):需要两步繁殖,引入Cre/loxp系统
示例
bash
杂合子繁殖方案,起始10只雌鼠和5只雄鼠,目标获得10只杂合子后代
python scripts/main.py --scheme heterozygote --females 10 --males 5 --target-pups 10
纯合子繁殖,自定义周期参数
python scripts/main.py --scheme homozygote --females 20 --males 10 --target-pups 20 --gestation 21 --weaning 21
条件性基因敲除方案
python scripts/main.py --scheme conditional --females 15 --males 15 --target-pups 15
输出
- - 各阶段时间线
- 各阶段所需笼位数
- 估算总成本
- 繁殖流程图
风险评估
| 风险指标 | 评估 | 等级 |
|---|
| 代码执行 | Python/R脚本在本地执行 | 中 |
| 网络访问 |
无外部API调用 | 低 |
| 文件系统访问 | 读取输入文件,写入输出文件 | 中 |
| 指令篡改 | 标准提示词指南 | 低 |
| 数据泄露 | 输出文件保存至工作区 | 低 |
安全检查清单
- - [ ] 无硬编码凭据或API密钥
- [ ] 无未授权文件系统访问(../)
- [ ] 输出不泄露敏感信息
- [ ] 已实施提示注入防护
- [ ] 输入文件路径已验证(无../遍历)
- [ ] 输出目录限制在工作区
- [ ] 脚本在沙盒环境中执行
- [ ] 错误消息已清理(不暴露堆栈跟踪)
- [ ] 依赖项已审计
前置条件
bash
Python依赖
pip install -r requirements.txt
评估标准
成功指标
- - [ ] 成功执行主要功能
- [ ] 输出符合质量标准
- [ ] 优雅处理边界情况
- [ ] 性能可接受
测试用例
- 1. 基本功能:标准输入 → 预期输出
- 边界情况:无效输入 → 优雅错误处理
- 性能:大数据集 → 可接受处理时间
生命周期状态
- - 当前阶段:草案
- 下次审核日期:2026-03-06
- 已知问题:无
- 计划改进:
- 性能优化
- 增加额外功能支持