-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (28 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TODAY ?= $(shell date +%Y-%m-%d)
URIBASE= http://purl.obolibrary.org/obo
ONTBASE= $(URIBASE)/chebi/obophenotype
ROBOT= robot
VERSION= $(TODAY)
ANNOTATE_ONTOLOGY_VERSION = annotate -V $(ONTBASE)/releases/$(VERSION)/$@ --annotation owl:versionInfo $(VERSION)
MIR= true
CLEAN_FILES= chebi.owl.gz chebi.owl
ifeq ($(MIR),true)
mirror/chebi.owl.gz: clean
curl -L $(URIBASE)/chebi.owl.gz --create-dirs -o $@ --retry 4 --max-time 200
.PRECIOUS: mirror/chebi.owl.gz
endif
mirror/chebi.owl: mirror/chebi.owl.gz
$(ROBOT) convert -i $< -o $@
.PRECIOUS: mirror/chebi.owl
clean:
rm -f $(foreach file, $(CLEAN_FILES), mirror/$(file))
.PHONY: clean
chebi_slim.owl: mirror/chebi.owl seed.txt
$(ROBOT) extract -i $< -T seed.txt --force true --copy-ontology-annotations true --individuals include --method BOT \
query --update sparql/inject-subset-declaration.ru --update sparql/inject-synonymtype-declaration.ru --update sparql/postprocess-module.ru \
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) convert -f ofn --output [email protected] && mv [email protected] $@
.PRECIOUS: chebi_slim.owl
chebi_slim.obo: chebi_slim.owl
$(ROBOT) convert --input $< --check false -f obo -o [email protected] && grep -v ^owl-axioms [email protected] > $@ && rm [email protected]
.PRECIOUS: chebi_slim.obo
all: chebi_slim.owl chebi_slim.obo