SuperAPI AI 工具集

locus-to-gene-mapper-skill

编程与开发

查看项目

更新于 10-16 03:05

技能介绍

用途:面向生物信息学人员,对某一性状或一组种子lead变异生成可复现、可追溯的位点(locus)到候选基因映射,附明确证据归因和保守置信标签。

主要能力:按强制顺序串联多个技能——efo-ontology-skill解析性状为规范EFO术语并展开子性状;gwas-catalog-skill发现锚定变异;内置NCBI RefSNP解析GRCh37/GRCh38坐标;opentargets-skill获取可信集、L2G和共定位证据;gtex-eqtl-skill获取单组织eQTL;genebass-gene-burden-skill获取罕见变异负荷;可选ClinVar、gnomAD、人类蛋白图谱上下文。最终按确定性权重(L2G 0.40、coloc 0.25、eQTL 0.15、burden 0.10、coding 0.10)计算总分并给出High/Medium/Low/VeryLow置信度,输出locus_to_gene_mapping.json与locus_to_gene_summary.md,可选生成图表。

使用方式:需Python 3.11+与requests,出图可选matplotlib、seaborn、pandas。主入口为scripts/map_locus_to_gene.py。可带输入JSON运行:python locus-to-gene-mapper-skill/scripts/map_locus_to_gene.py --input-json /path/to/input.json --print-result;也可直接传性状:python locus-to-gene-mapper-skill/scripts/map_locus_to_gene.py --trait-query "type 2 diabetes" --print-result。仅传性状时默认include_figures=true,可用--no-include-figures关闭。公开接口为map_locus_to_gene(input_json: dict) -> dict。

输入:至少需提供trait_query、efo_id、seed_rsids之一;可选target_gene、show_child_traits(默认true)、phenotype_terms、max_anchor_associations(1200)、max_loci(25)、max_genes_per_locus(10)、max_coloc_rows_per_locus(100)、max_eqtl_rows_per_variant(200)、genebass_burden_sets(默认["pLoF","missense|LC"])、include_clinvar、include_gnomad_context、include_hpa_tissue_context(均默认true)、include_figures(默认false)、disable_default_seeds(默认false,为假时常见性状自动带内置种子rsID)、figure_output_dir、mapping_output_path、summary_output_path。

适用场景:需要从变异信号得到可能因果基因的探索性映射,要求证据可追溯、结果可复现、置信度保守。

限制:不声称确定因果基因;不运行上游未提供的精细定位方法;缺失证据不得静默视为正向支持,须记为限制并降低置信度;不编造rsID、p值、得分、队列、组织或基因关联;无锚定、坐标未解析(标记degraded)、评分字段缺失或总分越界等触发QC失败;映射结果仅基于公开资料来源,具体收费、价格与效果资料暂未提供。