-
Notifications
You must be signed in to change notification settings - Fork 8
NCIt graph queries
A Blazegraph RDF triplestore is available for performing graph queries on the NCIt. It can be queried via the Blazegraph web UI here: https://stars-app.renci.org/ncitgraph/#query
Alternatively the SPARQL endpoint (https://stars-app.renci.org/ncitgraph/sparql
) can be used via any SPARQL tool, for example YASGUI, or command-line HTTP tools (curl
or wget
).
This page describes the organization of the triplestore. A separate page documents demonstration queries.
The data in the triplestore are organized into multiple named graphs. They are listed below, and can also be queried.
Graph IRI: http://purl.obolibrary.org/obo/ncit.owl
This is simply the RDF serialization of the ontology OWL file.
Graph IRI: http://purl.obolibrary.org/obo/ncit/ncit-plus.owl
Similarly, a graph containing the "Plus" version of the ontology with Uberon and CL terms swapped in.
For main ontology:
Graph IRI: http://purl.obolibrary.org/obo/ncit/ncit-property-graph.ttl
Graph IRI: http://purl.obolibrary.org/obo/ncit/ncit-property-graph-redundant.ttl
For "Plus" ontology:
Graph IRI: http://purl.obolibrary.org/obo/ncit/ncit-plus-property-graph.ttl
Graph IRI: http://purl.obolibrary.org/obo/ncit/ncit-plus-property-graph-redundant.ttl
These graphs includes "direct" property relationships between classes, for convenient graph queries of domain-specific relationships. For example, in the RDF serialization of OWL, the axiom Bone_Marrow_Disorder SubClassOf (Disease_Has_Associated_Anatomic_Site some Bone_Marrow)
is translated into 4 RDF triples:
Bone_Marrow_Disorder rdfs:subClassOf [a owl:Restriction;
owl:onProperty Disease_Has_Associated_Anatomic_Site;
owl:someValuesFrom Bone_Marrow ] .
In these graphs these relationships are represented by a single triple:
Bone_Marrow_Disorder Disease_Has_Associated_Anatomic_Site Bone_Marrow .
Thus these RDF graphs are not "valid OWL", but instead provide a simplified view of existential property restrictions; some property characteristics, in particular InverseOf
, are no longer applicable. Relationships in these graphs are not a structural transformation of property restrictions found in the ontology; rather all possible property restrictions are queried using the ELK reasoner and thus SPARQL queries such as the following should provide "complete" results (with regard to ELK's capabilities):
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX Disease_Has_Associated_Anatomic_Site: <http://purl.obolibrary.org/obo/NCIT_R100>
PREFIX Bone_Marrow: <http://purl.obolibrary.org/obo/NCIT_C12431>
SELECT DISTINCT ?disease ?label
FROM <http://purl.obolibrary.org/obo/ncit.owl>
FROM <http://purl.obolibrary.org/obo/ncit/ncit-property-graph-redundant.ttl>
WHERE {
?disease Disease_Has_Associated_Anatomic_Site: Bone_Marrow: .
?disease rdfs:label ?label .
}
You can run that query on the NCIt Blazegraph database via YASGUI.
In http://purl.obolibrary.org/obo/ncit/ncit-property-graph.ttl
, only "non-redundant" property links are included: i.e. a link between two classes x
and y
is valid for all the subclasses of x
and all the superclasses of y
. So the same query using the non-redundant graph would need to be like this:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX Disease_Has_Associated_Anatomic_Site: <http://purl.obolibrary.org/obo/NCIT_R100>
PREFIX Bone_Marrow: <http://purl.obolibrary.org/obo/NCIT_C12431>
SELECT DISTINCT ?disease ?label
FROM <http://purl.obolibrary.org/obo/ncit.owl>
FROM <http://purl.obolibrary.org/obo/ncit/ncit-property-graph-redundant.ttl>
WHERE {
?disease rdfs:subClassOf*/Disease_Has_Associated_Anatomic_Site:/rdfs:subClassOf* Bone_Marrow: .
?disease rdfs:label ?label .
}
Graph IRI: https://data.monarchinitiative.org/ttl/reactome.ttl
Graph IRI: https://data.monarchinitiative.org/ttl/coriell.ttl
Graph IRI: https://data.monarchinitiative.org/ttl/bgee.ttl
Graph IRI: https://data.monarchinitiative.org/ttl/ncbigene.ttl
These graphs provide RDF data aggregated from external sources by the Monarch Initiative. They are included for the purposes of integrative queries from NCIt to other sources which use OBO ontologies.