Skip to content

Commit

Permalink
Workaround for lack of relaxation in ROBOT.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Mar 7, 2024
1 parent d7e7c70 commit 3e6d272
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ ANNOTATE_VERSION_IRI = annotate -V $(ONTBASE)/releases/`date +%Y-%m-%d`/$@.owl

# by default we use ELK to perform a reason-relax-reduce chain
# after that we annotate the ontology with the release versionInfo
$(ONT).owl: $(SRC)
$(SRC).relaxed.obo: $(SRC)
./relax-qcrs.pl $< > $@.tmp && mv $@.tmp $@
$(ONT).owl: $(SRC).relaxed.obo
$(ROBOT) reason --input $< --reasoner ELK \
relax \
reduce -r ELK \
Expand Down Expand Up @@ -235,7 +237,7 @@ IM=build-$(ONT)
build-docker:
docker build -t $(ONT) .


include upa.Makefile



Expand Down
11 changes: 11 additions & 0 deletions src/ontology/relax-qcrs.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/perl

while (<>) {
print;
if (m@cardinality="(\d+)"@) {
if ($1) {
s@\s+\{.*\} *@ @;
print;
}
}
}

0 comments on commit 3e6d272

Please # to comment.