geneontology / obographs

Basic and Advanced OBO Graphs: specification and reference implementation
63 stars 12 forks source link

What to do with multiple labels / definitions etc? #107

Open matentzn opened 2 months ago

matentzn commented 2 months ago

I know this case is clearly not a use case for obographs-json, but the behaviour is super chaotic:

Example of an HPO class in the international edition ``` Abnormální zvýšení poměru výšky pohárku hlavy zrakového nervu k výšce disku. An abnormal increase in the ratio of the height of the cup of the optic nerve head to the height of the disk. Optik sinir baş çukurunun yüksekliğinin disk yüksekliğine oranında anormal bir artış 2018-07-08T00:08:21Z Primary open angle glaucoma is causing a progressive optic neuropathy and its development is associated with loss of tissue in the neuroretinal rim of the optic disc and that will lead to increase in the size of the optic cup. Clinical estimation of the size of the cup using either the slit lamb or a simple imaging modalities such as fundus images is a significant clinical parameter and remains the simplest and most frequently performed assessment of the optic disc in the diagnosis and follows up the progression of the glaucoma suspect. The estimation of the size of the cup is usually made by comparison with the size of the disk and given as the ratio of the vertical and horizontal diameter of the cup to the vertical and horizontal diameter. Artmış dikey çukurluk disk oranı Augmentation du rapport vertical cupule/disque Aumento de la relación copa-disco vertical (CDR) del nervio óptico Increased vertical cup-to-disc ratio Zvýšený vertikální poměr pohárku k disku 垂直カップ・ディスク比の増加 垂直杯盘比增加 Abnormální zvýšení poměru výšky pohárku hlavy zrakového nervu k výšce disku. en An abnormal increase in the ratio of the height of the cup of the optic nerve head to the height of the disk. cs CANDIDATE An abnormal increase in the ratio of the height of the cup of the optic nerve head to the height of the disk. Optik sinir baş çukurunun yüksekliğinin disk yüksekliğine oranında anormal bir artış en An abnormal increase in the ratio of the height of the cup of the optic nerve head to the height of the disk. tr CANDIDATE Artmış dikey çukurluk disk oranı en Increased vertical cup-to-disc ratio tr OFFICIAL Augmentation du rapport vertical cupule/disque label of HP:0031973 (Increased vertical cup-to-disc ratio) ; abnormality of the eye en Increased vertical cup-to-disc ratio fr OFFICIAL Aumento de la relación copa-disco vertical (CDR) del nervio óptico en Increased vertical cup-to-disc ratio es OFFICIAL Zvýšený vertikální poměr pohárku k disku en Increased vertical cup-to-disc ratio cs OFFICIAL 垂直カップ・ディスク比の増加 http://purl.obolibrary.org/obo/hp.owl en Increased vertical cup-to-disc ratio http://purl.obolibrary.org/obo/hp/releases/2023-07-21/hp.owl 2023-07-31 ja EXACT OFFICIAL 垂直杯盘比增加 en Increased vertical cup-to-disc ratio zh OFFICIAL Optik sinir baş çukur yüksekliğinin disk yüksekliğine oranı 0.6'dır (normal çukur disk oranı 0.3'tür) Poměr výšky pohárku hlavičky zrakového nervu k výšce disku je 0,6 (normální poměr pohárku a disku je 0,3). Ratio of the height of the cup of the optic nerve head to the height of the disk is 0.6 (The normal cup-to-disc ratio is 0.3). 2018-07-08T00:13:08Z Artmış dikey çukurluk disk oranı - 0.6 Augmentation du rapport vertical coupe-disque - 0.6 Aumento de la relación copa-disco vertical (CDR) - 0.6 del nervio óptico Increased vertical cup-to-disc ratio - 0.6 Zvýšený vertikální poměr pohárku k disku - 0,6 垂直カップ・ディスク比の増加-0.6 垂直杯盘比增加-0.6 Optik sinir baş çukur yüksekliğinin disk yüksekliğine oranı 0.6'dır (normal çukur disk oranı 0.3'tür) en Ratio of the height of the cup of the optic nerve head to the height of the disk is 0.6 (The normal cup-to-disc ratio is 0.3). tr CANDIDATE Poměr výšky pohárku hlavičky zrakového nervu k výšce disku je 0,6 (normální poměr pohárku a disku je 0,3). en Ratio of the height of the cup of the optic nerve head to the height of the disk is 0.6 (The normal cup-to-disc ratio is 0.3). cs CANDIDATE Ratio of the height of the cup of the optic nerve head to the height of the disk is 0.6 (The normal cup-to-disc ratio is 0.3). Artmış dikey çukurluk disk oranı - 0.6 en Increased vertical cup-to-disc ratio - 0.6 tr OFFICIAL Augmentation du rapport vertical coupe-disque - 0.6 label of HP:0031974 (Increased vertical cup-to-disc ratio - 0.6) ; abnormality of the eye en Increased vertical cup-to-disc ratio - 0.6 fr OFFICIAL Aumento de la relación copa-disco vertical (CDR) - 0.6 del nervio óptico en Increased vertical cup-to-disc ratio - 0.6 es OFFICIAL Zvýšený vertikální poměr pohárku k disku - 0,6 en Increased vertical cup-to-disc ratio - 0.6 cs OFFICIAL 垂直カップ・ディスク比の増加-0.6 http://purl.obolibrary.org/obo/hp.owl en Increased vertical cup-to-disc ratio - 0.6 http://purl.obolibrary.org/obo/hp/releases/2023-07-21/hp.owl 2023-07-31 ja EXACT OFFICIAL 垂直杯盘比增加-0.6 en Increased vertical cup-to-disc ratio - 0.6 zh OFFICIAL ```

This case may be anti-OBO from a philosophical standpoint, but its not really great that users of the obographs json file get a random mix of labels and definitions picked by the converter:

obographs version of the above ``` { "id" : "http://purl.obolibrary.org/obo/HP_0031973", "lbl" : "垂直杯盘比增加", "type" : "CLASS", "meta" : { "definition" : { "val" : "Optik sinir baş çukurunun yüksekliğinin disk yüksekliğine oranında anormal bir artış" }, "comments" : [ "Primary open angle glaucoma is causing a progressive optic neuropathy and its development is associated with loss of tissue in the neuroretinal rim of the optic disc and that will lead to increase in the size of the optic cup. Clinical estimation of the size of the cup using either the slit lamb or a simple imaging modalities such as fundus images is a significant clinical parameter and remains the simplest and most frequently performed assessment of the optic disc in the diagnosis and follows up the progression of the glaucoma suspect. The estimation of the size of the cup is usually made by comparison with the size of the disk and given as the ratio of the vertical and horizontal diameter of the cup to the vertical and horizontal diameter." ], "basicPropertyValues" : [ { "pred" : "http://purl.org/dc/elements/1.1/date", "val" : "2018-07-08T00:08:21Z" }, { "pred" : "http://purl.org/dc/terms/creator", "val" : "https://orcid.org/0000-0002-0736-9199" } ] } } ```

As you can see, the converter randomly selected one of the 8 labels and combined it with one of the 3 definitions.

Here are some questions:

  1. In cases like this should we use meta instead of lbl and definition slots to reduce ambiguity?
  2. Fail hard during conversion?
  3. Rely on some notion of "default language"? (which we require to be asserted)
cmungall commented 2 months ago

This has always been the case for obo format conversion, and we do (2), fail hard unless strict mode is relaxed.

However, I think for the multilingual use case we might want a more general multilingual solution

We have a test case here:

https://github.com/INCATools/ontology-access-kit/tree/main/tests/input/obo-compliance/invalid-name-duplicate