Skip to content

Commit

Permalink
Merge pull request #70 from INCATools/fix-custom-prefix-for-RG
Browse files Browse the repository at this point in the history
Fix generation of prefixes yaml for custom prefix maps
  • Loading branch information
hrshdhgd authored Mar 14, 2023
2 parents b128c79 + a836dee commit c260aa4
Show file tree
Hide file tree
Showing 7 changed files with 1,049 additions and 602 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ s3-deploy:
aws s3 sync stage s3://bbop-sqlite --acl public-read && \
aws s3 sync stage s3://bbop-sqlite/releases/$(DATE) --acl public-read

s3-deploy-%: stage/%.db.gz
aws s3 cp $< s3://bbop-sqlite/$*.db.gz --acl public-read

################################################
#### Commands for building the Docker image ####
################################################
Expand Down
7 changes: 5 additions & 2 deletions src/semsql/builder/build.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,19 @@ PREFIX_YAML_PATH = $(PREFIX_DIR)/prefixes.yaml
mv $@.tmp $@
.PRECIOUS: %.db

%-prefixes.yaml: $(PREFIX_CSV_PATH)
grep -v ^prefix, $< | grep -v ^obo, | perl -npe 's@,(.*)@: "$$1"@' > $@.tmp && mv $@.tmp $@

# -- ENTAILED EDGES --
# relation-graph is used to compute entailed edges.
%-$(RGSUFFIX).tsv: %-min.owl %-properties.txt $(PREFIX_YAML_PATH)
%-$(RGSUFFIX).tsv: %-min.owl %-properties.txt %-prefixes.yaml
$(RG) --disable-owl-nothing true \
--ontology-file $<\
$(RG_PROPERTIES) \
--output-file $@.tmp \
--equivalence-as-subclass true \
--mode TSV \
--prefixes $(PREFIX_YAML_PATH) \
--prefixes $*-prefixes.yaml \
--output-individuals true \
--output-subclasses true \
--reflexive-subclasses true && \
Expand Down
119 changes: 47 additions & 72 deletions src/semsql/builder/sql_schema/relation_graph.sql

Large diffs are not rendered by default.

87 changes: 45 additions & 42 deletions src/semsql/builder/sql_schema/semsql.sql

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/semsql/linkml/relation_graph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ classes:
SELECT subject, predicate, object
FROM rdfs_subclass_of_named_statement
UNION
SELECT subject, predicate, object
FROM rdfs_subproperty_of_statement
UNION
SELECT subject, predicate, object
FROM rdf_type_statement WHERE object IN (SELECT id FROM class_node)
in_subset:
Expand Down
Loading

0 comments on commit c260aa4

Please # to comment.