-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (20 loc) · 867 Bytes
/
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
GCMD = inputs/gcmd.rdf
OBO = http://purl.obolibrary.org/obo
all: mappings
ONTS = envo pato
mappings: $(patsubst %, target/gcmd-to-%.tsv, $(ONTS))
$(GCMD):
curl -L -s 'https://gcmdservices.gsfc.nasa.gov/kms/concepts/concept_scheme/sciencekeywords/?format=rdf' > $@
.PRECIOUS: $(GCMD)
target/%.owl:
curl -L -s $(OBO)/$*.owl > [email protected] && mv [email protected] $@
.PRECIOUS: target/%.owl
# See https://github.com/ESIPFed/sweet/issues/159
target/sweet.owl:
riot --out=TTL ../sweet/src/merged/sweetMerged.nt > $@
# TODO: use SSSOM
target/gcmd-to-%.tsv: target/%.owl
rdfmatch --prefix GCMD -f tsv -l -i prefixes.ttl -i $(GCMD) -i $< -G target/gcmd-to-$*.ttl match > [email protected] && mv [email protected] $@
target/gcmd-to-sweet.tsv: target/sweet.ttl
rdfmatch --prefix GCMD -f tsv -l -i prefixes.ttl -i $(GCMD) -i $< -G target/gcmd-to-sweet.ttl match > [email protected] && mv [email protected] $@
# TODO: boomer