-
Notifications
You must be signed in to change notification settings - Fork 0
/
Script_StandardsPatho-Robot.sh
executable file
·145 lines (119 loc) · 5.3 KB
/
Script_StandardsPatho-Robot.sh
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#! /bin/bash
cleanup=0
update=0
build=0
function usage {
echo " "
echo "usage: $0 [-b][-c][-u]"
echo " "
echo " -b build owl file"
echo " -c cleanup temp files"
echo " -u initalize/update submodule"
echo " -h -? print this help"
echo " "
exit
}
while getopts "bcuh?" opt; do
case "$opt" in
c)
cleanup=1
;;
u) update=1
;;
b) build=1
;;
?)
usage
;;
h)
usage
;;
esac
done
if [ -z "$1" ]; then
usage
fi
## check if submodule is initialized
gitchk=$(git submodule foreach 'echo $sm_path `git rev-parse HEAD`')
if [ -z "$gitchk" ];then
update=1
echo "Initializing git submodule"
fi
## Initialize and update git submodule
if [ $update -eq 1 ]; then
git submodule init
git submodule update
fi
### Build ontologies
if [ $build -eq 1 ]; then
## Merge Core Ontology
robot merge --input ./dependencies/RDFBones/RDFBones-main.owl \
--input ./dependencies/RDFBones/FMA-RDFBonesSubset.owl \
--input ./dependencies/RDFBones/RDFBones-ROIs-EntireBoneOrgan.owl \
--input ./dependencies/RDFBones/OBI-RDFBonesSubset.owl \
--input ./dependencies/RDFBones/CIDOC-CRM-RDFBonesSubset.owl \
--input ./dependencies/RDFBones/SIO-RDFBonesSubset.owl \
--input ./dependencies/RDFBones/VIVO-RDFBonesSubset.owl \
--output results/Merged_CoreOntology.owl
## CATEGORY LABELS
robot template --template Template_StandardsPatho-CategoryLabels.tsv \
--prefix "rdfbones: http://w3id.org/rdfbones/core#" \
--prefix "fma: http://purl.org/sig/ont/fma/" \
--prefix "obo: http://purl.obolibrary.org/obo/" \
--prefix "standards-si: http://w3id.org/rdfbones/ext/standards-si/" \
--prefix "standards-patho: http://w3id.org/rdfbones/ext/standards-patho/" \
--ontology-iri "http://w3id.org/rdfbones/ext/standards-patho/standards-patho.owl" \
--output results/StandardsPatho_CategoryLabels.owl
## VALUE SPECIFICATIONS
## Merge category labels into core ontology
robot merge --input results/Merged_CoreOntology.owl \
--input results/StandardsPatho_CategoryLabels.owl \
--output results/Merged_CategoryLabels.owl
# Create value specifications
robot template --template Template_StandardsPatho-ValueSpecifications.tsv \
--input results/Merged_CategoryLabels.owl \
--prefix "rdfbones: http://w3id.org/rdfbones/core#" \
--prefix "obo: http://purl.obolibrary.org/obo/" \
--prefix "standards-patho: http://w3id.org/rdfbones/ext/standards-patho/" \
--ontology-iri "http://w3id.org/rdfbones/ext/standards-patho/standards-patho.owl" \
--output results/StandardsPatho_ValueSpecifications.owl
## MEASUREMENT DATA
## Merge value specifications into core ontology
robot merge --input results/Merged_CategoryLabels.owl \
--input results/StandardsPatho_ValueSpecifications.owl \
--output results/Merged_ValueSpecifications.owl
## Create measurement data
robot template --template Template_StandardsPatho-MeasurementData.tsv \
--input results/Merged_ValueSpecifications.owl \
--prefix "rdfbones: http://w3id.org/rdfbones/core#" \
--prefix "obo: http://purl.obolibrary.org/obo/" \
--prefix "standards-patho: http://w3id.org/rdfbones/ext/standards-patho/" \
--ontology-iri "http://w3id.org/rdfbones/ext/standards-patho/standards-patho.owl" \
--output results/StandardsPatho_MeasurementData.owl
## EXTENSION
robot merge --input results/StandardsPatho_CategoryLabels.owl \
--input results/StandardsPatho_ValueSpecifications.owl \
--input results/StandardsPatho_MeasurementData.owl \
--output results/standards-patho.owl
robot annotate --input results/standards-patho.owl \
--remove-annotations \
--ontology-iri "http://w3id.org/rdfbones/ext/standards-patho/latest/standards-patho.owl" \
--version-iri "http://w3id.org/rdfbones/ext/standards-patho/v0-1/standards-patho.owl" \
--annotation owl:versionInfo "0.1" \
--language-annotation rdfs:label "Pathological investigations from 'Standards for data collection from human skeletal remains'" en \
--language-annotation rdfs:comment "This ontology extension only works in combination with the RDFBones core ontology." en \
--annotation dc:creator "Felix Engel" \
--annotation dc:contributor "Stefan Schlager" \
--annotation dc:contributor "Jane E. Buikstra" \
--annotation dc:contributor "Eleanna Prevedorou" \
--annotation dc:contributor "Leigh Hayes" \
--annotation dc:contributor "Jessica Hotaling" \
--annotation dc:contributor "Hannah Liedl" \
--annotation dc:contributor "Jessica Rothwell" \
--language-annotation dc:description "This RDFBones ontology extension implements chapter 10, 'Paleopathology', from Buikstra, J. E., & Ubelaker, D. H. (Eds.) (1994). Standards for data collection from human skeletal remains. Fayetteville: Arkansas Archaeological Survey." en \
--language-annotation dc:title "Pathological investigations from 'Standards for data collection from human skeletal remains" en \
--output results/standards-patho.owl
fi
if [ $cleanup -eq 1 ]; then
rm results/Merged_CoreOntology.owl results/Merged_CategoryLabels.owl results/StandardsPatho_CategoryLabels.owl results/StandardsPatho_ValueSpecifications.owl results/Merged_ValueSpecifications.owl results/StandardsPatho_MeasurementData.owl
fi