Skip to content

Commit

Permalink
Merge pull request #299 from monarch-initiative/medicalspecialtybranch
Browse files Browse the repository at this point in the history
Add medical examination terms and close #287
  • Loading branch information
LCCarmody committed May 3, 2022
2 parents e4676dc + f4ca6b4 commit 16c678a
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 67 deletions.
Binary file removed pharmacotherapy_chemicalsubstance.numbers
Binary file not shown.
249 changes: 200 additions & 49 deletions src/ontology/maxo-edit.owl

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions src/sparql/COUNTtotalnotobsolete.sparql
@@ -0,0 +1,21 @@
prefix IAO: <http://purl.obolibrary.org/obo/IAO_>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>
# prefix def: <http://purl.obolibrary.org/obo/IAO_0000115>
prefix owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

# count how many non-obsolete classes are in MAXO

SELECT (count(distinct ?cls) as ?count)

WHERE
{
?cls a owl:Class .
?cls rdfs:label ?cls_label .
FILTER NOT EXISTS {
?cls owl:deprecated "true"^^xsd:boolean
}

FILTER( !isBlank(?cls) && regex(str(?cls), "^http://purl.obolibrary.org/obo/MAXO_"))
}
Expand Up @@ -4,12 +4,9 @@ prefix owl: <http://www.w3.org/2002/07/owl#>

SELECT ?cls ?def (group_concat(?xref) as ?xrefs) WHERE
{
?cls a owl:Class ;
oio:hasDbXref ?xref ;
?cls a owl:Class .
OPTIONAL { ?cls oio:hasDbXref ?xref } .
OPTIONAL { ?cls def: ?def } .
FILTER (!isBlank(?cls))
FILTER (!isBlank(?def))
FILTER (!isBlank(?xref))
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/MAXO_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/MAXO_")))
}
GROUP BY ?cls ?def
11 changes: 11 additions & 0 deletions src/sparql/labels_test.sparql
@@ -0,0 +1,11 @@
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?term (STR(?lab) AS ?label) WHERE {
?x rdf:type owl:Class .
OPTIONAL {?x rdfs:label ?lab}
FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/MAXO_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/MAXO_")))}
ORDER BY ?x


Expand Up @@ -5,13 +5,10 @@ prefix def: <http://purl.obolibrary.org/obo/IAO_0000115>
SELECT ?cls ?xref ?def WHERE
{
?cls a owl:Class ;
def: ?def .
#the 'optional' bracket makes everything option, and therefore prints out everything even if they ar missing a field
OPTIONAL {
# def: ?def .
?ano a owl:Axiom ;
owl:annotatedSource ?cls ;
owl:annotatedProperty def: ;
owl:annotatedTarget ?def ;
oio:hasDbXref ?xref .
}
}
9 changes: 0 additions & 9 deletions src/sparql/test

This file was deleted.

0 comments on commit 16c678a

Please sign in to comment.