wikipathways / GPML2RDF

GPML2RDF converter
Apache License 2.0
4 stars 2 forks source link

Link the State resource to the associated DataNode resource #112

Closed egonw closed 2 years ago

egonw commented 2 years ago

This is at the GPMLRDF level. Currently, the GPML State only has a Literal graphRef which makes it harder to lookup the DataNode because the graphRef is only unique local the the GPML file, and an extra match is needed to check they are both in the same pathway:

SELECT DISTINCT ?dataNodeLabel (SAMPLE(?uniprot_) AS ?uniprot) ?typeLabel WHERE {
  ?type a gpml:State ; gpml:graphRef/^gpml:graphId ?dataNode ;
        dcterms:isPartOf ?pathway ; gpml:textlabel ?typeLabel .
  ?dataNode dcterms:isPartOf ?pathway ; gpml:textlabel ?dataNodeLabel ;
    ^wp:isAbout/wp:bdbUniprot ?uniprot_ .
} ORDER BY ASC(?dataNodeLabel)

By adding the ObjectProperty we have a resource to resource triple.