althonos / pronto

A Python frontend to (Open Biomedical) Ontologies.
https://pronto.readthedocs.io
MIT License
226 stars 47 forks source link

OBO comments in relationships #96

Open jelisf opened 3 years ago

jelisf commented 3 years ago

Hi, I was wondering if there is any way to model OBO comments in relationships. The idea is to add the name of the related term as a comment. I add an example with a "is_a" relationship: [Term]id: ONT0:CHILD_2 [Term]id: ONT0:CHILD_2 name: child_2 is_a: ONT0:ROOT ! root

[Term] id: ONT0:ROOT name: root

Thanks in advance! José Luis

althonos commented 3 years ago

Hi @jelisf ,

the AST used by fastobo, the parser/serializer for the OBO and OBO-graphs format, does not support adding comments currently. When it does, I will update the serializer so that it adds comments to the is_a and relationship clauses.