Skip to content

Commit

Permalink
Merge pull request #115 from berkeleybop/114-update-build-and-qc-make…
Browse files Browse the repository at this point in the history
…file-targets

update build and qc Makefile targets
  • Loading branch information
realmarcin authored Aug 13, 2024
2 parents 48653ec + f5a570a commit 9659650
Show file tree
Hide file tree
Showing 10 changed files with 2,270 additions and 1,484 deletions.
12 changes: 0 additions & 12 deletions aio_summary_robot.txt

This file was deleted.

12 changes: 0 additions & 12 deletions branch-counts.rq

This file was deleted.

21 changes: 0 additions & 21 deletions is_a-edge-counts.rq

This file was deleted.

4 changes: 3 additions & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -700,4 +700,6 @@ Tricks:
endef
export data

include aio.Makefile
include aio.Makefile

make-aio: clean clean-extras remove-old-input components-from-new-input all
894 changes: 445 additions & 449 deletions src/ontology/aio-src.csv

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions src/ontology/aio.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,35 @@ components/%.owl: components/%.csv
-t $< \
annotate --annotation-file aio-annotations.ttl \
-o $@

clean-extras:
rm -rf aio.db aio-root-statistics* aio-2024-06-26.owl current-vs-2024-06-26-diff*

remove-old-input:
rm -rf aio-src.csv
rm -rf components/aio-component.owl

components-from-new-input: remove-old-input
make aio-src.csv
make components/aio-component.owl

aio.db: aio.owl # requires that rdftab and relation0graph have been installed locally and are on the default path
poetry run semsql make $@
rm -rf aio-relation-graph.tsv.gz

aio-root-statistics.tsv: aio.db # could use sqlite:obo:aio if the file in the BBOP S3 bucket is new enough
poetry run runoak \
--input $< statistics \
-O tsv -o $@ $$(poetry run runoak --input $< roots | cut -f 1 | sed '1d' | tr '\n' ' ')

aio-root-statistics-transposed-filtered.tsv: aio-root-statistics.tsv
python ../scripts/transpose_filter_statistics.py < $< > $@

aio-2024-06-26.owl:
wget -O $@ "https://raw.githubusercontent.com/berkeleybop/artificial-intelligence-ontology/v2024-06-26/aio.owl"

current-vs-2024-06-26-diff.txt: aio.owl aio-2024-06-26.owl
robot diff --left $< --right aio-2024-06-26.owl --output $@

current-vs-2024-06-26-diff-skip-defs.txt: current-vs-2024-06-26-diff.txt
cat $< | grep -v IAO_0000115 > $@
2,739 changes: 1,768 additions & 971 deletions src/ontology/components/aio-component.owl

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/scripts/transpose_filter_statistics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import sys

prefixes = ('id', 'class_count', 'subclass_of_axiom_count', 'distinct_synonym_count')
lines = [line.strip().split('\t') for line in sys.stdin]
transposed = zip(*lines)
filtered = [row for row in transposed if row[0] in prefixes]
print('\n'.join('\t'.join(item for item in row) for row in filtered))
15 changes: 15 additions & 0 deletions src/sparql/subclass-label-compatibility.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?parent ?parent_label ?child ?child_def
WHERE
{ ?child rdfs:subClassOf ?parent
MINUS
{ ?child rdfs:subClassOf <http://www.w3.org/2002/07/owl#Thing> }
FILTER isURI(?parent)
OPTIONAL
{ ?child obo:IAO_0000115 ?child_def }
OPTIONAL
{ ?parent rdfs:label ?parent_label }
}
ORDER BY ?parent ?child
18 changes: 0 additions & 18 deletions synonym-counts.rq

This file was deleted.

0 comments on commit 9659650

Please sign in to comment.