-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
57 lines (42 loc) · 1.46 KB
/
install.sh
File metadata and controls
57 lines (42 loc) · 1.46 KB
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
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
source set-environment-variables.sh
# no need to export PATH since it is already in the environment:
# `printenv | grep -w PATH` returns non-zero output
PATH="${CONSTRAINT_TOOLS}/install:$PATH"
##########################
kernel=$(uname --kernel-name)
machine=$(uname --machine)
if [[ ${machine} != 'x86_64' || ${kernel} != 'Linux'* ]]; then
error "not Linux x86_64"
exit 1
fi
##########################
if ! which conda; then
error "please install conda"
exit 1
fi
conda_environment_configuration="conda-environment.yml"
# assume that the conda environment is the first line of the conda environment configuration file
first_line=$(cat ${conda_environment_configuration} | head -1)
IFS=: read key value <<< "${first_line}"
conda_environment_name=$(echo "${value}" | tr -d '[:space:]')
info "testing to see if a conda environment with name '${conda_environment_name}' exists..."
if conda info --envs | grep "${conda_environment_name}"; then
error "conda environment with name '${conda_environment_name}' already exists!"
error "exiting..."
exit 1
fi
info "creating a conda environment called ${conda_environment_name} using ${conda_environment_configuration}..."
conda env create -f ${conda_environment_configuration}
##########################
mkdir --parents ${CONSTRAINT_TOOLS}/bin
install-jq
install-node
install-samtools
install-htslib
install-bedtools
install-bcftools
install-mysql