geneontology / obographs

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

Instability in representation of deprecation status in obographs JSON #70

Open dosumis opened 4 years ago

dosumis commented 4 years ago

How is the AP mapping for the deprecated key specified?

Schema has deprecated as a primary key under meta: https://github.com/geneontology/obographs/blob/master/schema/subschemas/obographs-meta-schema.json#L123

I have code that relies on this when parsing obographs JSON, but recently this not been showing up in translations, instead ending up only as a pred val pair under basicPropertyValues, e.g. -

{'id': 'http://purl.obolibrary.org/obo/FBbt_00050127', 'meta': {'definition': {'val': '.', 'xrefs': ['FlyBase:FBrf0221412', 'FlyBase:FBrf0221438']}, 'basicPropertyValues': [{'pred': 'http://purl.obolibrary.org/obo/IAO_0100001', 'val': 'FBbt:00100545'}, {'pred': 'http://www.w3.org/2002/07/owl#deprecated', 'val': 'true'}, {'pred': 'http://www.geneontology.org/formats/oboInOwl#hasOBONamespace', 'val': 'fly_anatomy.ontology'}, {'pred': 'http://www.w3.org/2000/01/rdf-schema#comment', 'val': 'Obsoleted due to equivalence with neuroblast DALcl1 (Omoto et al., 2018 - FBrf0240929).'}]}, 'type': 'CLASS', 'lbl': 'neuroblast AOTUv3'}

from

image

(note also - boolean cast to string!)

dosumis commented 4 years ago

@cmungall - any idea why this might be the case?

dosumis commented 4 years ago

CC @julesjacobsen

julesjacobsen commented 4 years ago

So when you say 'recently' has there been a change to the obographs library you're using?

dosumis commented 4 years ago

I'm not using directly. It comes through re-use in OWL-API. @cmungall would know if/when there have been changes there. Note - it could be that there's some subtle difference is source (OWL/OBO) files that is causing the change. If so, not obvious what that might be.

julesjacobsen commented 4 years ago

It's probably more likely that's the case as the obographs library hasn't been changed in a long while. There is a new version in the immutables branch, but this should produce identical output.

julesjacobsen commented 4 years ago

What ontology are you using? Simply loading upheno.owl using owl api and then converting to obographs yaml produces this:

# example of a deprecated class
  - id: "http://purl.obolibrary.org/obo/VT_0000009"
    lbl: "red blood cell quantity"
    type: "CLASS"
    meta:
      definition:
        val: "OBSOLETE: Replace with VT:00001586, erythrocyte quantity."
        xrefs:
        - "VTO:CP"
      basicPropertyValues:
      - pred: "http://www.geneontology.org/formats/oboInOwl#created_by"
        val: "mshimoyama"
      - pred: "http://www.geneontology.org/formats/oboInOwl#creation_date"
        val: "2011-06-14T03:01:56Z"
      - pred: "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace"
        val: "Trait.ontology"
      deprecated: true
# however your class doesn't appear to have all the information as shown in protege
  - id: "http://purl.obolibrary.org/obo/FBbt_00050127"
    lbl: "Drosophila neuroblast AOTUv3"
    type: "CLASS"
dosumis commented 4 years ago

http://purl.obolibrary.org.obo/fbbt.owl

https://github.com/ontodev/robot/blob/c4524c031fae8f836c6ca434d86ee2b76034b6f0/robot-core/src/main/java/org/obolibrary/robot/IOHelper.java#L29