Education
按孟德尔概率树(乘法定律沿分支、加法定律跨分支)逐步推算系谱图中后代的患病概率。常染色体隐性:P(患病) = P(父携带) × P(母携带) / 4,另给出携带概率(两个已知携带者 → 1/4 患病、1/2 携带,如囊性纤维化);常染色体显性(假定杂合患病,如亨廷顿病):双亲患病 → 3/4 患病;X 连锁隐性(血友病 A、色盲):携带者母亲 × 正常父亲 → 50% 儿子患病、50% 女儿携带,并给出子/女分支与总概率。输出每一步分支计算,可直接对照手写解题。来源:Griffiths、Hartl & Clark 2007、StatPearls。仅供教学用途,不能替代遗传咨询。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/pedigree-probability-tree' \
-H 'Content-Type: application/json' \
-d '{"inheritanceMode":"autosomal-recessive","fatherProbability":1,"motherProbability":1,"decimalPlaces":4}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/pedigree-probability-tree| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| inheritanceMode | select | 是 | Autosomal recessive: probabilities are carrier probabilities. Autosomal dominant: probabilities of being affected (heterozygous). X-linked recessive: father = probability affected, mother = probability carrier. |
| fatherProbability | number | 是 | Recessive: P(father is a carrier). Dominant: P(father is affected, heterozygous Aa). X-linked recessive: P(father is affected). |
| motherProbability | number | 是 | Recessive: P(mother is a carrier). Dominant: P(mother is affected, heterozygous Aa). X-linked recessive: P(mother is a carrier). |
| decimalPlaces | number | 否 | — |
将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-pedigree-probability-tree": {
"name": "pedigree-probability-tree",
"description": "按孟德尔概率树(乘法定律沿分支、加法定律跨分支)逐步推算系谱图中后代的患病概率。常染色体隐性:P(患病) = P(父携带) × P(母携带) / 4,另给出携带概率(两个已知携带者 → 1/4 患病、1/2 携带,如囊性纤维化);常染色体显性(假定杂合患病,如亨廷顿病):双亲患病 → 3/4 患病;X 连锁隐性(血友病 A、色盲):携带者母亲 × 正常父亲 → 50% 儿子患病、50% 女儿携带,并给出子/女分支与总概率。输出每一步分支计算,可直接对照手写解题。来源:Griffiths、Hartl & Clark 2007、StatPearls。仅供教学用途,不能替代遗传咨询。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=pedigree-probability-tree",
"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": "pedigree-probability-tree",
"arguments": {
"inheritanceMode": "autosomal-recessive",
"fatherProbability": 1,
"motherProbability": 1,
"decimalPlaces": 4
}
}
}有问题或反馈?请联系 [email protected]
JSON 结果
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}