SciGraph / golr-loader

Convert SciGraph queries into json that can be loaded by Golr
Apache License 2.0
1 stars 3 forks source link

Use de-reification in evidence graphs #25

Open cmungall opened 7 years ago

cmungall commented 7 years ago

The evidence graph currently has association objects as nodes, following the RDF reification pattern. This inflates the graph. It would be better to de-reify these by making the association node properties properties of the relevant edge

For each:

?annId oban:association_has_subject ?s
?annId oban:association_has_object ?o
OPTIONAL ?annId oban:association_has_predicate ?p
?annId dc:source ?src
?annId RO_0002558 ?evtype
?annId ?p1 ?v1
...
?annId ?pn ?vn

(the predicate edge is often missing. Why?)

Find this:

{sub: ?s,
 obj: ?o
 pred: ?p}

and replace with:

{sub: ?s,
 obj: ?o
 pred: ?p,
 meta: {
  id: ?annId,
  xrefs: [?src],
 ...
 }
}

Note it may be better to do this further upstream in SciGraph itself, in the BBOPGraph mapping algorithm.

Example here:


[
{
"obj": "GO:0030500PHENOTYPE",
"pred": "http://purl.obolibrary.org/obo/RO_0002200",
"sub": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-6"
},
{
"obj": "ZFIN:ZDB-GENE-050417-357",
"pred": "http://purl.obolibrary.org/obo/GENO_0000443",
"sub": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-7"
},
{
"obj": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-6",
"pred": "http://purl.org/oban/association_has_subject",
"sub": "MONARCH:7c16f8c23d210cb4f7f6e2929333789b"
},
{
"obj": "GO:0030500PHENOTYPE",
"pred": "http://purl.org/oban/association_has_object",
"sub": "MONARCH:7c16f8c23d210cb4f7f6e2929333789b"
},
{
"obj": "PMID:22087291",
"pred": "http://purl.org/dc/elements/1.1/source",
"sub": "MONARCH:dfd7c1916c111384ce0649139c5d4eb6"
},
{
"obj": "GO:0030500PHENOTYPE",
"pred": "http://purl.obolibrary.org/obo/RO_0002200",
"sub": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-7"
},
{
"obj": "GO:0030500PHENOTYPE",
"pred": "http://purl.org/oban/association_has_object",
"sub": "MONARCH:dfd7c1916c111384ce0649139c5d4eb6"
},
{
"obj": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-7",
"pred": "http://purl.org/oban/association_has_subject",
"sub": "MONARCH:dfd7c1916c111384ce0649139c5d4eb6"
},
{
"obj": "PMID:22087291",
"pred": "http://purl.org/dc/elements/1.1/source",
"sub": "MONARCH:dfd7c1916c111384ce0649139c5d4eb6"
},
{
"obj": "PMID:22087291",
"pred": "http://purl.org/dc/elements/1.1/source",
"sub": "MONARCH:7c16f8c23d210cb4f7f6e2929333789b"
},
{
"obj": "ECO:0000059",
"pred": "http://purl.obolibrary.org/obo/RO_0002558",
"sub": "MONARCH:dfd7c1916c111384ce0649139c5d4eb6"
},
{
"obj": "PMID:22087291",
"pred": "http://purl.org/dc/elements/1.1/source",
"sub": "MONARCH:7c16f8c23d210cb4f7f6e2929333789b"
},
{
"obj": "ECO:0000059",
"pred": "http://purl.obolibrary.org/obo/RO_0002558",
"sub": "MONARCH:7c16f8c23d210cb4f7f6e2929333789b"
},
{
"obj": "ZFIN:ZDB-GENE-050417-357",
"pred": "http://purl.obolibrary.org/obo/GENO_0000443",
"sub": ":_ZDB-GENE-050417-357-ZDB-MRPHLNO-111209-6"
}
]```
kshefchek commented 7 years ago

(the predicate edge is often missing. Why?)

We need to switch from association_has_object_property to association_has_predicate

cmungall commented 7 years ago

but it seems that neither is present at the moment?

kshefchek commented 4 years ago

(the predicate edge is often missing. Why?)

this was fixed with https://github.com/SciGraph/SciGraph/pull/273