Skip to content

Commit

Permalink
re-name existing query for mult gene associations
Browse files Browse the repository at this point in the history
  • Loading branch information
twhetzel committed Nov 24, 2024
1 parent 4d43032 commit 24e9c01
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/sparql/qc/mondo/qc-multiple-gene-associations-ORIG.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
prefix mondoSparqlQcMondo: <http://purl.obolibrary.org/obo/mondo/sparql/qc/mondo/>
prefix mondo: <http://purl.obolibrary.org/obo/mondo#>

# Get classes that have more than 1 gene association (either subClassOf or equivalentClass) with RO:0004003 property

SELECT DISTINCT ?entity ?label (GROUP_CONCAT(DISTINCT ?geneIdentifier; separator=", ") AS ?geneIdentifiers)
WHERE {
{
# subClassOf association
?entity rdfs:subClassOf ?restriction ;
rdfs:label ?label .

?restriction rdf:type owl:Restriction ;
owl:onProperty obo:RO_0004003 ;
owl:someValuesFrom ?geneIdentifier .
FILTER NOT EXISTS {
?entity mondo:excluded_from_qc_check mondoSparqlQcMondo:qc-multiple-gene-associations.sparql .
}
}
UNION
{
# equivalentClass association
?entity owl:equivalentClass ?equivClass ;
rdfs:label ?label .

?equivClass owl:intersectionOf/rdf:rest*/rdf:first ?component .

?component rdf:type owl:Restriction ;
owl:onProperty obo:RO_0004003 ;
owl:someValuesFrom ?geneIdentifier .

FILTER NOT EXISTS {
?entity mondo:excluded_from_qc_check mondoSparqlQcMondo:qc-multiple-gene-associations.sparql .
}
}
}
GROUP BY ?entity ?label
HAVING (COUNT(DISTINCT ?geneIdentifier) > 1)

0 comments on commit 24e9c01

Please sign in to comment.