在R中使用OntologyX包导入.obo文件会导致”尝试在NULL上设置属性”错误。

huangapple go评论107阅读模式
英文:

Importing .obo file with OntologyX package in R results in 'attempt to set an attribute on NULL' error

问题

使用ontologyX包导入.obo文件时出现问题。

我想使用R包ontologyX导入people.obo文件:

library(ontologyIndex)

hp <- get_OBO("people.obo")

我已经从这个本体创建了obo文件:

https://www.michaeldebellis.com/post/the-people_example-ontology

使用这个工具:

http://robot.obolibrary.org/convert

当我尝试导入时,我得到了以下结果:

> hp <- get_OBO("people.obo")
Error in names(object) <- nm : attempt to set an attribute on NULL

如果我尝试使用protege将owl转换为obo,或者使用Pizza本体,我也遇到了相同的问题:

https://www.michaeldebellis.com/post/new-protege-pizza-tutorial

都不起作用。

但是,当我尝试打开go-basic.obo文件时一切正常:

http://geneontology.org/docs/download-ontology/

有什么帮助吗?

英文:

Problem with importing .obo file with onotolgyX package.

I want to import people.obo with R package ontologyX:

library(ontologyIndex)

hp &lt;- get_OBO(&quot;people.obo&quot;)

I have created obo file from this ontology:

https://www.michaeldebellis.com/post/the-people_example-ontology

With this tool:

http://robot.obolibrary.org/convert

I get this result when I want to import it:

&gt; hp &lt;- get_OBO(&quot;people.obo&quot;)
Error in names(object) &lt;- nm : attempt to set an attribute on NULL

I get the same problems if I convert owl to obo with protege or if I use Pizza ontology:

https://www.michaeldebellis.com/post/new-protege-pizza-tutorial

It doesn't work.

But everythnig works fine when I try to open go-basic.obo

http://geneontology.org/docs/download-ontology/

Any help ?

答案1

得分: 1

"包的作者回答 在R中使用OntologyX包导入.obo文件会导致”尝试在NULL上设置属性”错误。

'name'属性未分配给obo文件中的术语 - 这应该是允许的 - 所以我已经更新了包(请参见版本2.11),以便如果名称不存在,则使用'id'(应该很快在CRAN上可用,并且可以在您提供的示例上工作)."

英文:

The answer from the author of the package 在R中使用OntologyX包导入.obo文件会导致”尝试在NULL上设置属性”错误。

'name' properties were not assigned to terms in the obo file - which should be allowed - so I have updated the package (see version 2.11) so that it uses the 'id' if the name is absent (should be on CRAN shortly and work on the examples you provided).

huangapple
  • 本文由 发表于 2023年5月29日 19:40:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76357031.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定