diff --git a/src/sparql/qc/mondo/qc-multiple-gene-associations-ORIG.sparql b/src/sparql/qc/mondo/qc-multiple-gene-associations-ORIG.sparql new file mode 100644 index 000000000..60da29a72 --- /dev/null +++ b/src/sparql/qc/mondo/qc-multiple-gene-associations-ORIG.sparql @@ -0,0 +1,43 @@ +PREFIX rdf: +PREFIX owl: +PREFIX rdfs: +PREFIX obo: +PREFIX oboInOwl: +prefix mondoSparqlQcMondo: +prefix 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)