From 8ff2f460dac9d8800dfd9b3e953ffa4e17f57a31 Mon Sep 17 00:00:00 2001 From: Shawn Tan <76212760+shawntanzk@users.noreply.github.com> Date: Fri, 18 Mar 2022 09:59:41 +0000 Subject: [PATCH] added some sparql queries Fixes https://github.com/obophenotype/brain_data_standards_ontologies/issues/275 --- src/sparql/pcl-celltypes-count.sparql | 10 ++++++++++ src/sparql/pcl_individual.sparql | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/sparql/pcl-celltypes-count.sparql create mode 100644 src/sparql/pcl_individual.sparql diff --git a/src/sparql/pcl-celltypes-count.sparql b/src/sparql/pcl-celltypes-count.sparql new file mode 100644 index 00000000..cb0095e1 --- /dev/null +++ b/src/sparql/pcl-celltypes-count.sparql @@ -0,0 +1,10 @@ +PREFIX owl: +PREFIX rdfs: +PREFIX CL: + +SELECT (COUNT (DISTINCT ?term) as ?pclcells) +WHERE { + ?term a owl:Class . + ?term rdfs:subClassOf* CL:0000003 + FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/PCL_"))) +} \ No newline at end of file diff --git a/src/sparql/pcl_individual.sparql b/src/sparql/pcl_individual.sparql new file mode 100644 index 00000000..96d8efce --- /dev/null +++ b/src/sparql/pcl_individual.sparql @@ -0,0 +1,10 @@ +PREFIX owl: + +SELECT (COUNT (DISTINCT ?ind) as ?indcount) +WHERE { + ?ind a owl:NamedIndividual . + { ?s3 ?p3 ?ind. } + UNION + { ?ind ?p4 ?o4 . } + FILTER(isIRI(?ind) && (STRSTARTS(str(?ind), "http://purl.obolibrary.org/obo/PCL_"))) +} \ No newline at end of file