forked from sanger-pathogens/SnpEffWrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_dependencies.sh
46 lines (35 loc) · 988 Bytes
/
install_dependencies.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
#!/bin/bash
set -x
set -e
start_dir=$(pwd)
#SNPEFF_VERSION="v4_1l_core"
SNPEFF_VERSION="v4_3t_core"
SNPEFF_DOWNLOAD_URL="http://sourceforge.net/projects/snpeff/files/snpEff_${SNPEFF_VERSION}.zip"
# Make an install location
if [ ! -d "${start_dir}/build" ]; then
mkdir "${start_dir}/build"
fi
build_dir="${start_dir}/build"
# DOWNLOAD ALL THE THINGS
download () {
url=$1
download_location=$2
if [ -e $download_location ]; then
echo "Skipping download of $url, $download_location already exists"
else
echo "Downloading $url to $download_location"
wget $url -O $download_location
fi
}
cd $build_dir
download $SNPEFF_DOWNLOAD_URL snpEff_${SNPEFF_VERSION}.zip
if [ -e "snpEff_${SNPEFF_VERSION}" ]; then
echo "Skipping unzip of snpEff_${SNPEFF_VERSION}.zip; it already exists"
else
unzip snpEff_${SNPEFF_VERSION}.zip
mv snpEff snpEff_${SNPEFF_VERSION}
fi
export SNPEFF_EXEC="${build_dir}/snpEff_${SNPEFF_VERSION}/snpEff.jar"
cd $start_dir
set +x
set +e