-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
28 lines (22 loc) · 1.44 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
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
mirror/chebi.owl:
if [ $(MIR) = true ]; then curl -L $(URIBASE)/chebi.owl.gz --create-dirs -o mirror/chebi.owl.gz --retry 4 --max-time 200 && $(ROBOT) convert -i mirror/chebi.owl.gz -o [email protected] && mv [email protected] $@; fi
.PRECIOUS: mirror/chebi.owl
mirror/chebi.owl.gz:
if [ $(MIR) = true ]; then curl -L $(URIBASE)/chebi.owl.gz --create-dirs -o $@ --retry 4 --max-time 200; fi
.PRECIOUS: mirror/chebi.owl.gz
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.obo
all: chebi_slim.owl chebi_slim.obo