althonos / althonos/pronto

How to extract all the terms from all the properties and the instances in a ontology?

Aperta
#184 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
267
Fork
48
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am a new user of pronto. I like it simplicity.

I am trying to exctract all the terms in an ontology (.owl). Let say we have the following ontology:
```



The Evidence & Conclusion Ontology (ECO) describes types of scientific evidence within the biological research domain that arise from laboratory experiments, computational methods, literature curation, or other means.
Evidence & Conclusion Ontology (ECO)

27:05:2022 15:33
eco
ECO (https://github.com/evidenceontology/evidenceontology) is released into the public domain under CC0 1.0 Universal (CC0 1.0). Anyone is free to copy, modify, or distribute the work, even for commercial purposes, without asking permission. Please see the Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/) for an easy-to-read description of CC0 1.0 or the full legal code (https://creativecommons.org/publicdomain/zero/1.0/legalcode) for more detailed information. To get a sense of why ECO is CC0 as opposed to licensed under CC-BY, please read this thoughtful discussion (https://github.com/OBOFoundry/OBOFoundry.github.io/issues/285) on the OBO Foundry GitHub site.


GO:0061041
regulation of wound healing
Bill Gates



```

In the main function I write like that:
```
ontology_path = "PATH TO THE ONTOLOGY"
myOnto= Ontology(ontology_path)
for term in myOnto.terms():
print(term)
```

I get only the Term in the label property:
`Term('GO:0061041', name='regulation of wound healing')`

However, How can also extract the term in rdfs:comment property? It looks like we can only use the label's property.

Similarly how can extract terms from instances in the ontology. Let say:
```

....
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.