monarch-initiative / omim

Data ingest pipeline for OMIM.
7 stars 3 forks source link

Illegal punning on some properties #60

Open matentzn opened 2 years ago

matentzn commented 2 years ago

The following properties are used wrongly:

http://purl.obolibrary.org/obo/RO_0002200 http://purl.obolibrary.org/obo/RO_0002525 http://purl.obolibrary.org/obo/RO_0003303

You are using them as Annotation properties, while they should be Object properties. (They are defined as Object Properties in RO, and haveing them as Annotation Properties in OMIM constitutes what is called "illegal punning").

This query reflects the necessary change, but you should fix it at source (in the python code).

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix RO: <http://purl.obolibrary.org/obo/RO_>
DELETE {
  ?cls ?pred ?obj .
  ?pred rdf:type owl:AnnotationProperty .
}
INSERT {
  ?pred rdf:type owl:ObjectProperty .
  ?cls rdfs:subClassOf [
               owl:onProperty ?pred ;
               owl:someValuesFrom ?obj ] 
}
WHERE {
  VALUES ?pred { RO:0002200 RO:0002525 RO:0003303 }
  ?cls ?pred ?obj .
  ?pred rdf:type owl:AnnotationProperty .
}
joeflack4 commented 2 years ago

Example for my purposes; I copy/pasted from mondo.owl:

        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/chebi#is_conjugate_base_of"/>
                <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/CHEBI_4551"/>
            </owl:Restriction>
        </rdfs:subClassOf>
joeflack4 commented 2 years ago

Analysis

Just investigating the current usage of these three RO relationship edges/properties in omim.ttl:

http://purl.obolibrary.org/obo/RO_0002200

All instances of these usages are like so, with subject as an NCBIGene entry and object as OMIM entry.

NCBIGene:100009675 RO:0002200 OMIM:611107 .

http://purl.obolibrary.org/obo/RO_0002525 & http://purl.obolibrary.org/obo/RO_0003303

All instances of these usages are directly on classes, with subject as an OMIM class declarations.

OMIM:191195 a owl:Class ;
    rdfs:label "MAP3K8" ;
    RO:0002525 CHR:9606chr10p11.23 ;
    RO:0003303 OMIM:211980 ;
    rdfs:subClassOf SO:0000704 .

Questions

  1. What's the best place to go to look at the difference between object properties and annotation properties? I googled but couldn't find anything that was easy to understand in this context. A lot of times I got "object properties vs data properties" in my results.

  2. Do I need to make them all look like this?: For RO:0002525 and RO:0003303:

    OMIM:191195 a owl:Class ;
    rdfs:subClassOf [
               owl:onProperty RO:0002525 ;
               owl:someValuesFrom CHR:9606chr10p11.23 ] ;
    rdfs:subClassOf [
               owl:onProperty RO:0003303 ;
               owl:someValuesFrom OMIM:211980 ]  .
    NCBIGene:100009675 rdfs:subClassOf [
               owl:onProperty RO:0002200 ;
               owl:someValuesFrom OMIM:611107 ]  .
matentzn commented 2 years ago

Some annotation properties are like object properties (what you would call relationships) and connect two entities (classes, individuals) (skos:exactMatch for example). Some annotation properties are like data properties and connect entities with literals (foaf:first_name, rdfs:label, sw:birth_date).

Annotation properties are ignored by the reasoner. Data and Object Properties are taken into account by the reasoner.

matentzn commented 2 years ago
  1. The best way to figure out what type a property is is to use search in ontobee:

https://www.ontobee.org/ontology/RO?iri=http://purl.obolibrary.org/obo/RO_0003303

(replace the iri parameter with the URI, you are looking for.)

Alternatively, you can go here https://www.ontobee.org/ and put the id in the keywords box. This will tell you which ontology has the id. Click on the ontology (RO) under the id not the IRI itself. This will bring you to a page that will tell yo the type (the page linked above).

  1. I think its :
OMIM:123 rdfs:subClassOf [ rdf:type owl:Restriction ;
  owl:onProperty <http://purl.obolibrary.org/obo/BFO_0000050> ;
  owl:someValuesFrom <http://purl.obolibrary.org/obo/UBERON_0001017>
] 

Add it and try in opening with ROBOT (or PRotege)