Skip to content

Commit

Permalink
Merge pull request #95 from berkeleybop/table-2
Browse files Browse the repository at this point in the history
table-2
  • Loading branch information
caufieldjh authored Aug 5, 2024
2 parents a0fdc30 + 9fdc32a commit 4d59e46
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
12 changes: 12 additions & 0 deletions branch-counts.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>

select ?branch (count(distinct ?child_class) as ?class_count)
where {
?branch rdfs:subClassOf owl:Thing .
?child_class rdfs:subClassOf* ?branch .
}
group by ?branch
order by ?branch


21 changes: 21 additions & 0 deletions is_a-edge-counts.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>

select distinct ?branch ?child_class ?is_a_edge
where {
values ?syn_type {
oio:hasExactSynonym
oio:hasRelatedSynonym
}
?branch rdfs:subClassOf owl:Thing .
?child_class rdfs:subClassOf* ?branch .
?child_class rdfs:subClassOf ?is_a_edge .
minus {
?child_class rdfs:subClassOf owl:Thing .
}
filter(isiri(?is_a_edge))
}
order by ?branch ?child_class ?is_a_edge


18 changes: 18 additions & 0 deletions synonym-counts.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>

select ?branch (count(distinct ?synonym) as ?synonym_count)
where {
values ?syn_type {
oio:hasExactSynonym
oio:hasRelatedSynonym
}
?branch rdfs:subClassOf owl:Thing .
?child_class rdfs:subClassOf* ?branch .
?child_class ?syn_type ?synonym .
}
group by ?branch
order by ?branch


11 changes: 11 additions & 0 deletions table-2.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: branch-counts synonym-counts is_a-edge-counts

branch-counts.tsv: src/ontology/aio.owl
arq --data $< --query branch-counts.rq --results=TSV > $@

synonym-counts.tsv: src/ontology/aio.owl
arq --data $< --query synonym-counts.rq --results=TSV > $@

is_a-edge-counts.tsv: src/ontology/aio.owl
arq --data $< --query is_a-edge-counts.rq --results=TSV > $@

0 comments on commit 4d59e46

Please sign in to comment.