owlcollab / oboformat

Automatically exported from code.google.com/p/oboformat
5 stars 2 forks source link

Question about synonym format #115

Closed fanavarro closed 5 years ago

fanavarro commented 5 years ago

Hi all, I am checking different ontologies and applying different parsers and, at the moment, I am not very sure about the correct format for synonyms.

On one hand, could they have a trailing modifier? The 1.2 obo specification states the following:

Any tag-value pair may be followed by a trailing modifier.

As a synonym is also a tag-value pair, I suppose that it could include trailing modifiers. Nonetheless, the synonym section of the same document says the following:

The value consists of a quote enclosed synonym text, an optional scope identifier, an optional synonym type name, and an optional dbxref list.

Trailing modifiers are not mentioned here. So, my question is if statements like the following are legal or not: synonym: "ion" EXACT [] {date="2009-03-18"}

I also have seen definitions like the following: synonym: "ion" EXACT [{date="2009-03-18"}]

I think this previous one should not be legal as the trailing modifier appears in the xref list without an xref.

Thanks in advance for your time.

althonos commented 5 years ago

Hi @fanavarro,

The second definition is definitely invalid. The first one is right. Qualifiers can only follow a clause line, not be part of it.

If in doubt, you can use fastobo-validator to verify if an OBO file is in valid OBO 1.4 format.

fanavarro commented 5 years ago

Hi @althonos, thanks for your answer. I really appreciate your link to fastobo-validator, it will save a lot of time writing questions here.

Thanks again for your time.