Skip to content

Commit

Permalink
reverted to pre translation version as something went wrong in buildi…
Browse files Browse the repository at this point in the history
…ng csv and merged files
  • Loading branch information
mcourtot committed Feb 23, 2021
1 parent 933d5c6 commit ad77a27
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,25 @@ OBO=http://purl.obolibrary.org/obo
ONT=duo
BASE=$(OBO)/$(ONT)
SRC=$(ONT)-edit.owl
MRG=$(ONT)-merged.owl
RELEASEDIR=../..
ROBOT= robot
OWLTOOLS= owltools
USECAT= --use-catalog

all: $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(ONT)-japanese.csv

all: $(ONT).owl $(ONT)-basic.owl $(ONT).csv

test:all


prepare-release-local:
cp $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(ONT)-japanese.csv $(RELEASEDIR) &&\
echo "Release files are now in $(RELEASEDIR) - please check locally. Nothing has been added to GH yet."

prepare-release:
cp $(ONT).owl $(ONT)-basic.owl $(ONT).csv $(ONT)-japanese.csv $(RELEASEDIR) &&\
prepare_release:
$(ROBOT) reason -i $(SRC) -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $(ONT).owl
cp $(ONT).owl $(RELEASEDIR) &&\
git add $(RELEASEDIR)/*.owl
echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on github"

$(ONT).owl:
#merges in the japanese translation
$(ROBOT) merge -i $(SRC) -i $(ONT)-japanese.owl -o $(ONT).owl
#build the owl file
$(ROBOT) reason -i $(ONT).owl -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $@

$(ONT)-basic.owl: $(ONT).owl root-terms.txt
$(ROBOT) merge -i $(ONT).owl filter --term-file root-terms.txt --select "annotations self descendants ontology" annotate --ontology-iri $(BASE)-basic.owl -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT)-basic.owl -o $@

$(ONT).csv: $(ONT)-basic.owl make-csv.sparql
$(ROBOT) query -i $(ONT)-basic.owl --query make-csv.sparql $(ONT).csv
echo "Release files are now in $(RELEASEDIR) - now you should commit, push and make a release on github"


$(ONT)-japanese.csv: $(ONT)-basic.owl make-csv-japanese.sparql
$(ROBOT) query -i $(ONT)-basic.owl --query make-csv-japanese.sparql $(ONT)-japanese.csv
$(ONT).owl: $(SRC)
$(ROBOT) reason -i $< -r ELK relax reduce -r ELK annotate -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT).owl -o $@

# remove OBO which doesn't work with IAO and is not needed
#$(ONT).obo: $(ONT).owl
Expand All @@ -58,9 +43,19 @@ $(ONT)-japanese.csv: $(ONT)-basic.owl make-csv-japanese.sparql
# $(OWLTOOLS) $(USECAT) $< -o -f obo $@

# clone remote ontology locally, performing some excision of relations and annotations
mirror/%.owl: $(MRG)



$(ONT)-basic.owl: $(ONT).owl root-terms.txt
$(ROBOT) merge -i $(ONT).owl filter --term-file root-terms.txt --select "annotations self descendants ontology" annotate --ontology-iri $(BASE)-basic.owl -V $(BASE)/releases/`date +%Y-%m-%d`/$(ONT)-basic.owl -o $@
$(ONT).csv: $(ONT)-basic.owl make-csv.sparql
$(ROBOT) query -i $(ONT)-basic.owl --query make-csv.sparql $(ONT).csv



mirror/%.owl: $(SRC)
$(OWLTOOLS) $(OBO)/$*.owl --remove-annotation-assertions -l -s -d --remove-dangling-annotations -o $@
.PRECIOUS: mirror/%.owl

release: $(ONT).owl $(ONT)-basic.owl $(ONT).csv
cp $^ $(RELEASEDIR)
release: $(ONT).owl #$(ONT).obo
cp $^ $RELEASEDIR

0 comments on commit ad77a27

Please sign in to comment.