用途:查询 Genome Aggregation Database(gnomAD),用于判断特定遗传变异的稀有度或等位基因频率、获取基因约束指标,以及检索区域或基因内的变异。
主要能力:
- 变异频率:返回全局及按祖源分组的等位基因频率、纯合子计数,以及外显子组、基因组和合并数据的 Grpmax Filtering AF(faf95/faf99)。变异 ID 格式为 chrom-pos-ref-alt(如 1-55516888-G-GA),也可用 rsID。
- 基因约束:返回基因的约束指标,响应中显式包含 pli,LOEUF 分数由 oe_lof_upper 表示。
- 区域/基因变异搜索:按区域或基因查找变异,基因搜索可指定 consequence(pLoF 或 missense)。
使用方式:需先安装 uv 并确保其在 PATH 中。所有脚本位于技能安装目录的 scripts/ 子目录,运行时使用脚本的完整绝对路径。核心规则是始终通过提供的封装脚本查询,而非直接访问数据库,脚本会自动遵守 gnomAD API 速率限制。示例命令: uv run scripts/get_variant_frequency.py --variant_id {variant_id} [--dataset {dataset}] --output variant_frequency.json uv run scripts/get_variant_frequency.py --rsid {rsid} [--dataset {dataset}] --output variant_frequency.json uv run scripts/get_gene_constraint.py --gene {gene_symbol} --output {gene_symbol}_constraint.json uv run scripts/search_variants.py --chrom {chrom} --start {start} --end {end} --output region_variants.json uv run scripts/search_variants.py --gene {gene_symbol} --consequence {pLoF|missense} --output {gene_symbol}_variants.json
限制与注意事项:若工作区根目录不存在 .licenses/gnomad_database_LICENSE.txt,需先提示用户查看 https://gnomad.broadinstitute.org/policies 与 https://gnomad.broadinstitute.org/data#api 的条款,再创建记录通知文本与时间戳的文件。使用本技能时需在输出中提及。更多数据文档见 https://gnomad.broadinstitute.org/data#api 与 https://gnomad.broadinstitute.org/help。