-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add label synonym polysemy check (#2112)
* add label synonym polysemy check * update annotation to use obo:cl#abbreviation in sparql qc --------- Co-authored-by: Anita Caron <[email protected]>
- Loading branch information
1 parent
949e6ba
commit 4256b6f
Showing
3 changed files
with
38 additions
and
1 deletion.
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
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,36 @@ | ||
PREFIX obo: <http://purl.obolibrary.org/obo/> | ||
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
SELECT ?entity ?property ?value WHERE { | ||
VALUES ?property { | ||
obo:IAO_0000118 | ||
oboInOwl:hasExactSynonym | ||
rdfs:label | ||
} | ||
{ SELECT DISTINCT ?iname (COUNT(DISTINCT ?entity) AS ?cnt) WHERE { | ||
VALUES ?property { | ||
obo:IAO_0000118 | ||
oboInOwl:hasExactSynonym | ||
rdfs:label | ||
} | ||
?entity ?property ?name . | ||
OPTIONAL { | ||
?abbr a owl:Axiom; | ||
owl:annotatedSource ?entity; | ||
owl:annotatedProperty oboInOwl:hasExactSynonym; | ||
owl:annotatedTarget ?name; | ||
oboInOwl:hasSynonymType <http://purl.obolibrary.org/obo/cl#abbreviation>. | ||
} | ||
|
||
BIND(UCASE((?name)) AS ?iname) | ||
FILTER (!isBlank(?entity) && !BOUND(?abbr)) | ||
FILTER NOT EXISTS { ?entity owl:deprecated true } | ||
} GROUP BY ?iname HAVING (?cnt > 1) | ||
} | ||
?entity ?property ?value . | ||
FILTER (!isBlank(?entity)) | ||
FILTER NOT EXISTS { ?entity owl:deprecated true } | ||
FILTER (UCASE(?value) = ?iname) | ||
} ORDER BY ?entity |