Education
模拟种群瓶颈后的期望杂合度损失(确定性期望)。理想 Wright-Fisher 漂变下每代 H_{t+1} = H_t(1 − 1/(2N)),故 H_final = H₀(1−1/2Nb)^t × (1−1/2Nr)^g;调和平均有效种群大小 Ne = (t+g)/(t/Nb + g/Nr) 由最小瓶颈主导;相对基础群体的累积近交系数 F = 1 − H_final/H₀。对频率 p 的目标等位基因,单代瓶颈存活概率 = 1 − (1−p)^(2Nb),稀有等位基因最先丢失。经典案例:北象海豹(1890 年代约 20 只幸存 → 近零变异)、猎豹、夏威夷雁、欧洲野牛、平格拉普环礁。来源:Wright 1931、Nei et al. 1975、Hartl & Clark 2007、StatPearls。仅供教学用途。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/bottleneck-effect-simulator' \
-H 'Content-Type: application/json' \
-d '{"initialHeterozygosity":0.5,"bottleneckSize":20,"bottleneckGenerations":5,"recoverySize":2000,"recoveryGenerations":10,"alleleFrequency":0.1,"decimalPlaces":4}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/bottleneck-effect-simulator| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| initialHeterozygosity | number | 是 | Heterozygosity before the bottleneck (0 < H₀ ≤ 1). |
| bottleneckSize | number | 是 | Census size during the bottleneck (Nb). |
| bottleneckGenerations | number | 是 | Number of generations spent at the bottleneck size (t). |
| recoverySize | number | 是 | Census size after recovery (Nr). |
| recoveryGenerations | number | 是 |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-bottleneck-effect-simulator": {
"name": "bottleneck-effect-simulator",
"description": "模拟种群瓶颈后的期望杂合度损失(确定性期望)。理想 Wright-Fisher 漂变下每代 H_{t+1} = H_t(1 − 1/(2N)),故 H_final = H₀(1−1/2Nb)^t × (1−1/2Nr)^g;调和平均有效种群大小 Ne = (t+g)/(t/Nb + g/Nr) 由最小瓶颈主导;相对基础群体的累积近交系数 F = 1 − H_final/H₀。对频率 p 的目标等位基因,单代瓶颈存活概率 = 1 − (1−p)^(2Nb),稀有等位基因最先丢失。经典案例:北象海豹(1890 年代约 20 只幸存 → 近零变异)、猎豹、夏威夷雁、欧洲野牛、平格拉普环礁。来源:Wright 1931、Nei et al. 1975、Hartl & Clark 2007、StatPearls。仅供教学用途。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=bottleneck-effect-simulator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bottleneck-effect-simulator",
"arguments": {
"initialHeterozygosity": 0.5,
"bottleneckSize": 20,
"bottleneckGenerations": 5,
"recoverySize": 2000,
"recoveryGenerations": 10,
"alleleFrequency": 0.1,
"decimalPlaces": 4
}
}
}有问题或反馈?请联系 [email protected]
| Generations spent at the recovery size (g; 0 to skip). |
| alleleFrequency | number | 是 | Frequency p of a focal allele used for the one-generation bottleneck survival estimate. |
| decimalPlaces | number | 否 | — |
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}