This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild-ontgraph.sh
137 lines (115 loc) · 4.23 KB
/
build-ontgraph.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
#!/bin/sh
opts='-mem 16384'
version="v`date +%Y%m%d`"
out="ncatskg-$version.db"
cache="cache=hash.db"
orphclass="orphanet_classifications"
orpha="orpha"
hpo="hpo"
# medgen if available
medgen="medgen"
#clinvar if available
clinvar="clinvar/ClinVarVariationRelease_00-latest.xml.gz"
genereviews="gene_NBK1116"
#this might be too much right now
ppi="ppi/BIOGRID-MV-Physical-3.5.172.mitab.txt.gz"
###########################
##### DON'T MESS BELOW
###########################
# make sure MONDO is last in disease ontologies
owl="doid.owl.gz \
hp.owl.gz \
MEDLINEPLUS.ttl.gz \
MESH.ttl.gz \
OMIM.ttl.gz \
ICD10CM.ttl.gz \
ordo_orphanet.owl.gz \
ORDO_es_2.9.owl.gz \
Thesaurus.owl.gz \
VANDF.ttl.gz \
bto.owl.gz \
clo.owl.gz \
cl.owl.gz \
ddiem.owl.gz \
uberon.owl.gz \
go.owl.gz \
geno.owl.gz \
ogg.owl.gz \
pw.owl.gz \
mp.owl.gz \
oae.owl.gz \
rxno.owl.gz \
ogms.owl \
pato.owl.gz \
fma.owl.gz"
owl_path="owl-202002"
owl_files=`echo $owl | xargs printf " ${owl_path}/%s"`
#echo $owl_files
#load GARD
gard_credentials=
if test -f "gard-credentials.txt"; then
gard_credentials=`cat gard-credentials.txt`
sbt stitcher/"runMain ncats.stitcher.impl.GARDEntityFactory\$Register $out $gard_credentials"
fi
#load GHR
sbt $opts stitcher/"runMain ncats.stitcher.impl.GHREntityFactory $out"
#load NORD
sbt $opts stitcher/"runMain ncats.stitcher.impl.NORDEntityFactory $out"
# load ontologies
#sbt -Djdk.xml.entityExpansionLimit=0 stitcher/"runMain ncats.stitcher.impl.OntEntityFactory $out $owl_files"
for f in $owl_files; do
sbt $opts -Djdk.xml.entityExpansionLimit=0 stitcher/"runMain ncats.stitcher.impl.OntEntityFactory $out $f"
done
# hit omim api to get additional data not in ontology
#if test -f "omim-credentials.txt"; then
# omim_credentials=`cat omim-credentials.txt`
# sbt stitcher/"runMain ncats.stitcher.impl.OMIMUpdateEntityFactory $out $omim_credentials"
#fi
#load ChEBI
sbt $opts -Djdk.xml.entityExpansionLimit=0 stitcher/"runMain ncats.stitcher.impl.OntEntityFactory $out $cache $owl_path/chebi.xrdf.gz"
#load rancho
sbt $opts stitcher/"runMain ncats.stitcher.impl.InxightEntityFactory $out $cache data/rancho-disease-drug_2018-12-18_13-30.txt"
# load orphan designation
sbt $opts stitcher/"runMain ncats.stitcher.impl.FDAOrphanDesignationEntityFactory $out data/FDAOrphanGARD_20190216.txt"
#load hpo annotations
if test -e $hpo/phenotype.hpoa; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.HPOEntityFactory $out $hpo/phenotype.hpoa"
fi
#load additional orphanet relationships if available
#if test -d $orphclass; then
# sbt stitcher/"runMain ncats.stitcher.impl.OrphanetClassificationEntityFactory $out $orphclass"
#fi
if test -e $orpha/en_product9_prev.xml; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.OrphanetPrevalenceEntityFactory $out $orpha/en_product9_prev.xml"
fi
if test -e $orpha/en_product9_ages.xml; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.OrphanetNaturalHistoryEntityFactory $out $orpha/en_product9_ages.xml"
fi
if test -e $orpha/en_product4_HPO.xml; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.OrphanetHPOEntityFactory $out $orpha/en_product4_HPO.xml"
fi
# load disease-gene association; the associations in the owl file aren't up to date
if test -e $orpha/en_product6.xml; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.OrphanetDiseaseGeneAssociationEntityFactory $out $orpha/en_product6.xml"
fi
#load MedGen if available
if test -d $medgen; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.MedGenEntityFactory $out $medgen"
fi
#load clinvar if avaiable
if test -f $clinvar; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.ClinVarVariationEntityFactory $out $clinvar"
fi
#load gene reviews if avaiable
if test -f $genereviews; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.GeneReviewsEntityFactory $out $genereviews"
fi
#load PPI if available
if test -f $ppi; then
sbt $opts stitcher/"runMain ncats.stitcher.impl.PPIEntityFactory $out $ppi"
fi
# make sure these are loaded after medgen
owl_last="efo.owl.gz mondo.owl.gz"
for f in `echo $owl_last | xargs printf " ${owl_path}/%s"`; do
sbt $opts -Djdk.xml.entityExpansionLimit=0 stitcher/"runMain ncats.stitcher.impl.OntEntityFactory $out $f"
done