When I use ROBOT’s convert function to turn an ontology into OBO Graph JSON (which in turn is based on the code in this repository), how do I know which graph is the “main” graph?
E.g., I did robot convert -I http://www.bioassayontology.org/bao/bao_complete.owl -o test.json then the following in Python script to look at each graph’s URI (which is called an ID in the OBO Graph JSON schema)
import json
with open("test.json) as file:
data = json.load(file)
for graph in data["graphs"]:
print(graph["id"])
From inspection, it’s obvious that some of these aren’t the main one, but is there a programatic way? I also know this isn’t an OBO Foundry ontology, but this also happens in a few (let me go back through and find some examples)
@cmungall said:
it looks like the json doesn’t include the owl:import triples. This isn’t a robot issue though ... I believe it’s just missing in the java code that generates it
When I use ROBOT’s convert function to turn an ontology into OBO Graph JSON (which in turn is based on the code in this repository), how do I know which graph is the “main” graph?
E.g., I did
robot convert -I http://www.bioassayontology.org/bao/bao_complete.owl -o test.json
then the following in Python script to look at each graph’s URI (which is called an ID in the OBO Graph JSON schema)and got:
From inspection, it’s obvious that some of these aren’t the main one, but is there a programatic way? I also know this isn’t an OBO Foundry ontology, but this also happens in a few (let me go back through and find some examples)
@cmungall said: