You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用ROBOT获取OBO本体中关联定义的数据库交叉引用?

如何获取OBO本体中与定义关联的交叉引用?

OBO本体里部分实体的定义会附带database_cross_reference(比如PMID)作为参考条目。比如某实体的定义格式为:
A round chondrocyte that first differentiates in the late embryonic growth plate of bone. [database_cross_reference: PMID:15951842]

我当前使用以下ROBOT命令导出本体实体表格:

robot export --input data/$1.owl 
  --header "ID|LABEL|IAO_0000115|hasDbXref|subClassOf [ID]" 
  --export data/$1.csv

但这个命令只能获取实体自身的hasDbXref,无法拿到与定义(IAO_0000115)直接绑定的交叉引用——这类引用在OWL文件中是以定义公理的注释形式存在的,结构如下:

<owl:Axiom>
        <owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/CL_0000742"/>
        <owl:annotatedProperty rdf:resource="http://purl.obolibrary.org/obo/IAO_0000115"/>
        <owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A round chondrocyte that first differentiates in the late embryonic growth plate of bone.</owl:annotatedTarget>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">PMID:15951842</oboInOwl:hasDbXref>
    </owl:Axiom>

解决方案

ROBOT的export命令支持通过公理注释映射语法提取这类关联引用,你只需在--header参数中用[被注释属性:注释属性]的格式指定要提取的内容。

针对你的场景,修改后的命令如下:

robot export --input data/$1.owl 
  --header "ID|LABEL|IAO_0000115|IAO_0000115:hasDbXref|hasDbXref|subClassOf [ID]" 
  --export data/$1.csv

说明:

  • IAO_0000115:hasDbXref 表示提取针对IAO_0000115(定义)属性的公理注释中的hasDbXref值,也就是你需要的与定义绑定的交叉引用。
  • 原有hasDbXref列会保留实体自身的交叉引用,两者互不干扰。

如果你的本体中使用的是hasDbXref的完整IRI(如http://purl.obolibrary.org/obo/oboInOwl_hasDbXref),可以替换为全称形式:

robot export --input data/$1.owl 
  --header "ID|LABEL|IAO_0000115|IAO_0000115:http://purl.obolibrary.org/obo/oboInOwl_hasDbXref|hasDbXref|subClassOf [ID]" 
  --export data/$1.csv

执行修改后的命令后,导出的CSV会新增一列,专门存放与定义关联的交叉引用。


内容的提问来源于stack exchange,提问作者Tiago Lubiana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 04:45:35