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 1/2] 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 From 58e8fd230bc79ed02c2c2e31996a325108c672bc Mon Sep 17 00:00:00 2001 From: Shawn Tan <76212760+shawntanzk@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:05:27 +0000 Subject: [PATCH 2/2] Create pcl_cluster.sparql --- src/sparql/pcl_cluster.sparql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/sparql/pcl_cluster.sparql diff --git a/src/sparql/pcl_cluster.sparql b/src/sparql/pcl_cluster.sparql new file mode 100644 index 00000000..da31da6f --- /dev/null +++ b/src/sparql/pcl_cluster.sparql @@ -0,0 +1,9 @@ +PREFIX owl: +PREFIX pcl: + +SELECT (COUNT (DISTINCT ?ind) as ?indcount) +WHERE { + ?ind a owl:NamedIndividual ; + pcl:0010059 ?cluster. + FILTER(isIRI(?ind) && (STRSTARTS(str(?ind), "http://purl.obolibrary.org/obo/PCL_"))) +} \ No newline at end of file