-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
50 lines (37 loc) · 1.54 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
.SECONDARY:
TODAY = $(shell date +%Y-%m-%d)
OBO = http://purl.obolibrary.org/obo/
# Directories
IMPORTS = src/ontology/imports
SUBSETS = src/ontology/subsets
# ------------------------------ PREREQS ------------------------------
ROBOT = java -jar build/robot.jar
build:
mkdir -p $@
build/robot.jar: build
curl -Lk https://github.com/ontodev/robot/releases/download/v1.4.0/robot.jar > $@
# ------------------------------ GAZ ------------------------------
#COUNTRIES = $(shell find $(SUBSETS)/countries -name \*.owl -print)
# Do not use this to create GAZ
# We are still working on how to use modules to build GAZ
#gaz: gaz.owl
#gaz.owl: $(COUNTRIES)
# $(eval INPUTS := $(foreach I,$(COUNTRIES), --input $(I)))
# robot merge --input src/ontology/gaz-min.owl $(INPUTS) \
# annotate --ontology-iri $(OBO)$@ --version-iri $(OBO)gaz/$(TODAY)/$@ --output $@
# ------------------------------ IMPORTS ------------------------------
imports: $(IMPORTS)/ro_import.owl $(IMPORTS)/envo_import.owl
$(IMPORTS)/ro_import.owl: $(IMPORTS)/ro_terms.txt | build/robot.jar
$(ROBOT) extract --input-iri $(OBO)ro.owl\
--method MIREOT --lower-terms $< --intermediates minimal \
annotate --ontology-iri $(OBO)$@ --output $@
$(IMPORTS)/envo_import.owl: $(IMPORTS)/envo_terms.txt | build/robot.jar
$(ROBOT) merge --input-iri $(OBO)envo.owl \
extract --method MIREOT --lower-terms $< --intermediates minimal \
remove --term BFO:0000004 \
annotate --ontology-iri $(OBO)$@ --output $@