-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (43 loc) · 2.49 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
OBO = http://purl.obolibrary.org/obo
CORE = src/ontology/ecosim-core.obo
MAIN = src/ontology/ecosim.obo
release:
cp src/ontology/ecosim.* .
%.owl: %.obo
robot convert -i $< -o $@
%.db: %.owl
runoak -i sqlite:$< terms
src/ontology/terms.txt: $(CORE)
robot merge -i $< query -q src/queries/terms.rq $@
$(MAIN): $(CORE) src/ontology/generated.obo src/ontology/imports.owl src/ontology/terms.txt
robot merge -i $< -i src/ontology/generated.obo filter -T src/ontology/terms.txt --trim true --signature false convert --check false -o $@
tmp/defs.kgcl.json:
runoak --stacktrace -v -i llm:src/ontology/ecosim.db generate-definitions .all -O json -o $@ --style-hints "Write definitions as if they come from an ontology of parameters for earth systems modeling."
index-ontology:
curategpt view index -V oboformat -c ecosim --source-locator $(MAIN)
index-ontology-dragon:
curategpt ontology index -c ont_ecosim -m openai: $(MAIN)
index-curated:
curategpt view index -V oboformat -c curated --source-locator src/ontology/ecosim-curated.obo
tmp/dragon-inputs.yaml:
./utils/obo2yamllines.pl $(CORE) > $@
tmp/dragon-output.yaml: tmp/dragon-inputs.yaml
curategpt -v complete-multiple --model gpt-4 -c ont_curated $< > [email protected] && mv [email protected] $@
tmp/dragon-output.obo.json: tmp/dragon-output.yaml
curategpt view unwrap -V oaklib -c ont_ecosim $< -t json > $@
tmp/dragon-output.obo: tmp/dragon-output.obo.json
runoak -v -i obograph:$< dump -O obo > $@
tmp/candidate-MaterialEntity.txt:
runoak -i simpleobo:src/ontology/generated.obo relationships -p ECOSIM:measured_in,ECOSIM:measurement_of .all | cut -f5| sort -u > $@
tmp/candidate-Context.txt:
runoak -i simpleobo:src/ontology/generated.obo relationships -p ECOSIM:context .all | cut -f5| sort -u > $@
tmp/candidate-Attribute.txt:
runoak -i simpleobo:src/ontology/generated.obo relationships -p ECOSIM:attribute .all | cut -f5| sort -u > $@
tmp/candidate-Qualifier.txt:
runoak -i simpleobo:src/ontology/generated.obo relationships -p ECOSIM:qualifier .all | cut -f5| sort -u > $@
src/ontology/material-entity.obo: src/ontology/material-entity.csv
robot template --prefix "ECOSIMCONCEPT: http://purl.obolibrary.org/obo/ECOSIMCONCEPT_" -vvv -t $< -o $@
src/ontology/attribute.obo: src/ontology/attribute.csv
robot template --prefix "ECOSIMCONCEPT: http://purl.obolibrary.org/obo/ECOSIMCONCEPT_" -vvv -t $< -o $@
src/ontology/imports.owl: src/ontology/attribute.obo src/ontology/material-entity.obo
robot merge $(patsubst %,-i %,$^) annotate -O $(OBO)/ecosim/imports.owl -o $@