-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
320 lines (281 loc) · 9.19 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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
#
# Makefile to streamline installation of databases
#
SHELL:=/bin/bash
PKG_NAME:=medgen-mysql
_:=$(shell mkdir -p logs)
help:
@echo " Type make <database> to download, unpack, create mysql store for each individual DB."
@echo " (for example: make clinvar)"
user: FORCE
./create_user.sh
# NCBI ClinVar provides "Clinical Variants" with phenotypes and gene linkages.
# ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar
clinvar: FORCE
rm -rf clinvar/mirror
-./mirror.sh clinvar/urls
./unpack.sh clinvar
make clinvar-xml
./create_database.sh clinvar
./load_database.sh clinvar
./index_database.sh clinvar
# NCBI clinvar-xml : clinvar IDs to HGVS labels .
clinvar-xml: FORCE
pyvenv ve
source ve/bin/activate && pip install numpy && pip install hgvs && pip install lxml
python clinvar/clinvar_hgvs.py
# ClinVitae: public variant database aggregated by Invitae
ClinVitae: FORCE
rm -rf ClinVitae/mirror
-./mirror.sh ClinVitae/urls
./unpack.sh ClinVitae
./create_database.sh ClinVitae
./load_database.sh ClinVitae
./index_database.sh ClinVitae
# CGD: Clinical Genomics Databsae
ClinicalGenomics: FORCE
-./mirror.sh ClinicalGenomics/urls
./unpack.sh ClinicalGenomics
./create_database.sh ClinicalGenomics
./load_database.sh ClinicalGenomics
./index_database.sh ClinicalGenomics
# NCBI dbSNP is deliberately limited to only HGVS mappings to RS# for a full dbSNP dump
# ftp://ftp.ncbi.nih.gov/snp
dbSNP: FORCE
rm -rf dbSNP/mirror
-./mirror.sh dbSNP/urls
./unpack.sh dbSNP
./create_database.sh dbSNP
./load_database.sh dbSNP
./index_database.sh dbSNP
# NCBI Genetic Testing Registry contains lab information for every genetic test you can order.
# ftp://ftp.ncbi.nlm.nih.gov/pub/GTR/
GTR: FORCE
-./mirror.sh GTR/urls
./unpack.sh GTR
./create_database.sh GTR
./load_database.sh GTR
./index_database.sh GTR
# GTR-xml : GTR Identifiers to PubMed citations and Testing Lab Codes (@@@TODO )
GTR-xml: FORCE
virtualenv ve
source ve/bin/activate && pip install lxml && python GTR/gtr_xml_gapfill.py
# LSDB contains BIC and LOVD installation data
# Will need to set the
LSDB: FORCE
rm -rf mirror
@if [ "${LSDB_USER}" = "" ]; then echo "Fatal error. Need to set LSDB_USER."; exit 1; fi
@if [ "${LSDB_PASS}" = "" ]; then echo "Fatal error. Need to set LSDB_PASS."; exit 1; fi
./mirror.sh LSDB/urls.bic_breast_cancer_core
./mirror.sh LSDB/urls.lovd
./unpack.sh LSDB
./create_database.sh LSDB
./load_database.sh LSDB
./index_database.sh LSDB
# NCBI PubTator links PubMed PMIDs to Text Mined Variants(tmVar), Genes(GenNorm), and other BioConcepts.
# ftp://ftp.ncbi.nlm.nih.gov/pub/lu/PubTator
PubTator: FORCE
rm -rf PubTator/mirror
-./mirror.sh PubTator/urls
./unpack.sh PubTator
./create_database.sh PubTator
./load_database.sh PubTator
./index_database.sh PubTator
# PersonalGenomes loads the MySQL dump
# http://evidence.pgp-hms.org
PersonalGenomes: FORCE
-./mirror.sh PersonalGenomes/urls
./unpack.sh PersonalGenomes
./create_database.sh PersonalGenomes
./load_database.sh PersonalGenomes
./index_database.sh PersonalGenomes
# NCBI Gene is the Entrez Gene Database
# ftp://ftp.ncbi.nih.gov/gene/
gene: FORCE
rm -rf gene/mirror
-./mirror.sh gene/urls
./unpack.sh gene
./create_database.sh gene
./load_database.sh gene
./index_database.sh gene
# NCBI GeneReviews provides BOOK links to Gene Names
# ftp://ftp.ncbi.nlm.nih.gov/pub/GeneReviews
GeneReviews: FORCE
-./mirror.sh GeneReviews/urls
./unpack.sh GeneReviews
./create_database.sh GeneReviews
./load_database.sh GeneReviews
./index_database.sh GeneReviews
# GO Gene Ontology is the grouping of genes
# http://geneontology.org/page/download-ontology
GO: FORCE
-./mirror.sh GO/urls
./unpack.sh GO
./create_database.sh GO
./load_database.sh GO
./index_database.sh GO
# HUGO Gene Naming Convention provides DB links using standard gene names
# http://www.genenames.org/cgi-bin/download
hugo: FORCE
-./mirror.sh hugo/urls
./unpack.sh hugo
./create_database.sh hugo
./load_database.sh hugo
./index_database.sh hugo
# Disease Gene Network is a near-comprehensive map of Gene:Disease relationships with scoring.
# http://disgenet.org/web/DisGeNET/menu/downloads#all
disgenet: FORCE
-./mirror.sh disgenet/urls
./unpack.sh disgenet
./create_database.sh disgenet
./load_database.sh disgenet
./index_database.sh disgenet
# DECIPHER Database of Chromosomal Imbalance and Phenotype in Humans using Ensembl Resources
# Provided by Sanger: https://www.sanger.ac.uk/science/tools/decipher-mapping-clinical-genome
decipher: FORCE
-./mirror.sh decipher/urls
./unpack.sh decipher
./create_database.sh decipher
./load_database.sh decipher
./index_database.sh decipher
# Human Phenotype Ontology is used to associate phenotypes, even across organisms.
# http://human-phenotype-ontology.org
hpo: FORCE
-./mirror.sh hpo/urls
./unpack.sh hpo
./create_database.sh hpo
./load_database.sh hpo
./index_database.sh hpo
# Orphanet is a rare-disease ontology ( LICENSE required for commercial use)
# http://www.orphadata.org/
orphanet: FORCE
-./mirror.sh orphanet/urls
# CHV Consumer Health Vocabulary links MedGen to phrases in common language.
# http://consumerhealthvocab.org
CHV: FORCE
-./mirror.sh CHV/urls
./unpack.sh CHV
./create_database.sh CHV
./load_database.sh CHV
./index_database.sh CHV
# NCBI medgen links phenotypes and genes to entries in pubmed, clinvar, the genetic testing registry, and 30+ sources.
medgen: FORCE
-./mirror.sh medgen/urls
./unpack.sh medgen
./create_database.sh medgen
./load_database.sh medgen
./index_database.sh medgen
medgen-views: FORCE
-cd medgen/views
ls -lah
# NCBI pubmed we provide links only to PubMedCentral.
# https://www.nlm.nih.gov/databases/license/weblic/index.html
pubmed: FORCE
#-./mirror.sh pubmed/urls.medlinebaseline
#-./mirror.sh pubmed/urls.medlineupdates
#-./mirror.sh pubmed/urls.fulltext
-./mirror.sh pubmed/urls.pmc
./unpack.sh pubmed
./create_database.sh pubmed
./load_database.sh pubmed
./index_database.sh pubmed
# all-variants : convenience function
all-variants: FORCE
make PubTator
make clinvar
make ClinVitae
make GTR
-make dbSNP
make PersonalGenomes
# all-genes : convenience function
all-genes: FORCE
-make gene
make GeneReviews
make hugo
make GO
# all-phenotypes : convenience function
all-phenotypes: FORCE
-make hpo
make ClinicalGenomics
make disgenet
make CHV
make orphanet
make medgen
# all : convenience function
all: FORCE
-make all-phenotypes
make all-genes
make all-variants
make pubmed
# backup all existing databases
backup: FORCE
-./backup_database.sh clinvar
./backup_database.sh ClinVitae
./backup_database.sh ClinicalGenomics
./backup_database.sh GTR
./backup_database.sh PubTator
./backup_database.sh dbSNP
./backup_database.sh PersonalGenomes
./backup_database.sh gene
./backup_database.sh GeneReviews
./backup_database.sh GO
./backup_database.sh hugo
./backup_database.sh disgenet
./backup_database.sh hpo
./backup_database.sh CHV
./backup_database.sh medgen
# clean mirror download zip contents and uncompressed files
clean: FORCE
-rm -rf clinvar/mirror
rm -rf ClinVitae/mirror
rm -rf ClinicalGenomics/mirror
rm -rf GTR/mirror
rm -rf PubTator/mirror
rm -rf dbSNP/mirror
rm -rf PersonalGenomes/mirror
rm -rf gene/mirror
rm -rf GeneReviews/mirror
rm -rf GO/mirror
rm -rf hugo/mirror
rm -rf disgenet/mirror
rm -rf hpo/mirror
rm -rf CHV/mirror
rm -rf medgen/mirror
rm -rf pubmed/mirror
# clean ./drop_database.sh
cleaner: clean
-./drop_database.sh clinvar
./drop_database.sh ClinVitae
./drop_database.sh ClinicalGenomics
./drop_database.sh GTR
./drop_database.sh PubTator
./drop_database.sh dbSNP
./drop_database.sh PersonalGenomes
./drop_database.sh gene
./drop_database.sh GeneReviews
./drop_database.sh GO
./drop_database.sh hugo
./drop_database.sh disgenet
./drop_database.sh hpo
./drop_database.sh CHV
./drop_database.sh medgen
./drop_database.sh pubmed
# clean mirror download zip contents and uncompressed files
cleanest: cleaner
rm -rf clinvar/mysqldump
rm -rf ClinVitae/mysqldump
rm -rf ClinicalGenomics/mysqldump
rm -rf GTR/mysqldump
rm -rf PubTator/mysqldump
rm -rf dbSNP/mysqldump
rm -rf PersonalGenomes/mysqldump
rm -rf gene/mysqldump
rm -rf GeneReviews/mysqldump
rm -rf GO/mysqldump
rm -rf hugo/mysqldump
rm -rf disgenet/mysqldump
rm -rf hpo/mysqldump
rm -rf CHV/mysqldump
rm -rf medgen/mysqldump
rm -rf pubmed/mysqldump
.PHONY: FORCE help user all clinvar clinvarxml ClinVitae GTR gene GeneReviews GO hugo medgen orphanet PersonalGenomes pubmed PubTator dbSNP