forked from oncodash/oncodashkb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare.sh
executable file
·80 lines (63 loc) · 1.96 KB
/
prepare.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
#!/usr/bin/bash
set -e
set -o pipefail
echo "Check for neo4j.pass..."
if [[ ! -f neo4j.pass ]] ; then
echo "File: neo4j.pass is missing."
exit 1
fi
echo "OK"
echo "Check OS dependencies..."
REQUIRED_PKG="python3-poetry gunzip"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ${REQUIRED_PKG}|grep "install ok installed")
if [ "" = "${PKG_OK}" ]; then
echo "Packages: ${REQUIRED_PKG} not installed. I will install them."
sudo apt update
sudo apt-get --yes install $REQUIRED_PKG
fi
echo "OK"
echo "Install Poetry environment..."
poetry install
echo "OK"
echo "Download data:"
mkdir -p data
cd data
echo "DECIDER data..."
check() {
if [[ ! -f "$1" ]] ; then
echo "File: data/DECIDER/$1 is missing."
exit 1
fi
}
if [[ ! -d DECIDER ]] ; then
echo "The data/DECIDER directory is missing."
exit 1
else
cd DECIDER
check genomics_oncokbannotation.csv
check genomics_cgimutation.csv
check genomics_cgidrugprescriptions.csv
check genomics_cgicopynumberalteration.csv
check clin_overview_clinicaldata.csv
cd ..
fi
cp -a ../../oncodashkb/adapters/Hugo_Symbol_genes.conf .
echo "OK"
echo "Gene Ontology..."
mkdir -p GO
cd GO
wget --no-clobber https://current.geneontology.org/annotations/goa_human.gaf.gz
gunzip goa_human.gaf.gz
wget --no-clobber https://purl.obolibrary.org/obo/go.owl
cd ..
echo "OK"
echo "Open Targets..."
mkdir -p OT
cd OT
rsync --ignore-existing -rpltvz --delete rsync.ebi.ac.uk::pub/databases/opentargets/platform/24.06/output/etl/parquet/targets .
rsync --ignore-existing -rpltvz --delete rsync.ebi.ac.uk::pub/databases/opentargets/platform/24.06/output/etl/parquet/diseases .
rsync --ignore-existing -rpltvz --delete rsync.ebi.ac.uk::pub/databases/opentargets/platform/24.06/output/etl/parquet/molecule .
rsync --ignore-existing -rpltvz --delete rsync.ebi.ac.uk::pub/databases/opentargets/platform/24.06/output/etl/parquet/evidence .
cd ..
echo "OK"
echo "Everything is OK, you can now call: ./make.sh."