-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional EFO xref context from axioms
merges #19 Co-authored-by: Bartek Foltyn <[email protected]>
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
PREFIX mondo: <http://purl.obolibrary.org/obo/mondo#> | ||
PREFIX efo: <http://www.ebi.ac.uk/efo/> | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT ?efo_id (?xref_uri as ?xref_id) ?mapping_property_id ?efo_uri ?xref_uri ?mapping_property_uri | ||
WHERE { | ||
VALUES ?mapping_property_uri {mondo:closeMatch mondo:exactMatch skos:mappingRelation skos:closeMatch skos:exactMatch skos:broadMatch skos:narrowMatch skos:relatedMatch} | ||
|
||
?efo_uri rdf:type owl:Class . | ||
?efo_uri ?mapping_property_uri ?xref_uri | ||
|
||
|
||
BIND( REPLACE( STR(?efo_uri), "^http.+/([^:]+)_(.+)$", "$1:$2" ) AS ?efo_id ) | ||
BIND( REPLACE( STR(?mapping_property_uri), "^http://purl\\.obolibrary\\.org/obo/mondo#(.+)$", "mondo:$1" ) AS ?mapping_property_id ) | ||
BIND( REPLACE( STR(?mapping_property_id), "^http://www\\.w3\\.org/2004/02/skos/core#(.+)$", "skos:$1" ) AS ?mapping_property_id ) | ||
} | ||
ORDER BY ?efo_id ?xref_id ?mapping_property_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> | ||
|
||
SELECT ?efo_id ?xref ?axiom_source | ||
WHERE { | ||
?axiom rdf:type owl:Axiom. | ||
?axiom owl:annotatedSource ?source. | ||
?axiom owl:annotatedProperty oboInOwl:hasDbXref. | ||
?axiom owl:annotatedTarget ?xref. | ||
|
||
OPTIONAL { ?axiom oboInOwl:source ?axiom_source }. | ||
|
||
BIND( REPLACE( STR(?source), "^http.+/([^:]+)_(.+)$", "$1:$2" ) AS ?efo_id ) | ||
} | ||
|
||
GROUP BY ?efo_id ?xref ?axiom_source | ||
ORDER BY ?efo_id ?xref ?axiom_source |