Knowledge-Graph-Hub/kg-covid-19

incompatbile use patterns for bl:interacts_with

Opened this issue · 4 comments

There are two uses of bl:interacts_with:

  1. Relational: ?x bl:interacts_with ?b

Example:

prefix owl: <http://www.w3.org/2002/07/owl#>
  prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  prefix bl: <https://w3id.org/biolink/vocab/>
  SELECT ?p1 ?p ?p2 WHERE
  {
  ?p1 bl:interacts_with ?p2 .
  } LIMIT 10
  1. Reified edge

Example:

prefix owl: <http://www.w3.org/2002/07/owl#>
  prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  prefix bl: <https://w3id.org/biolink/vocab/>
  SELECT ?p1 ?p ?p2 WHERE
  {
  ?interaction bl:edge_label bl:interacts_with .
  ?interaction bl:object ?p1 .
  ?interaction bl:subject ?p2 .
  ?interaction bl:relation ?p .
  } LIMIT 10

This makes it very difficult to consistently query all interactions.. You should probably pick one way (probably the second) and stick with it..

I can see the same for bl:regulates and the reified version with obo:RO_0002211..

I don't think this is mistake - @deepakunni3 can you confirm?

If I understand correctly from the convo yesterday, this is a deliberate design decision resulting from the fact that when reifying edges, we keep the original edge too

We follow RDF reification standards (and thus RDF*), the spo edge must always be present regardless of whether an edge is reified or not.

I think the question is: should all edges be reified? RDF doesn't require this of course but it can be nice for consistency of queries. If we have the rule that each edge must have at least provide_by then this entails reification. This should be the case for all database ingests. We may want to inject for ontologies

So from an analysis standpoint, we can simply ignore all reified edges then? So if I find any:

?r bl:relation ?p;
     bl:object ?o;
     bl:subject ?s .

where there is no corresponding ?s ?p ?o . edge, it is a bug? (we have that case for example for a lot of the interactions).