-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlocal_install_chia_pipe_dependencies.sh
executable file
·127 lines (101 loc) · 2.81 KB
/
local_install_chia_pipe_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
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
## Perform local installation of dependencies for ChIA-PIPE
## The help message:
function usage
{
echo -e "usage: bash local_install_chia_pipe_dependencies.sh -i INSTALL_DIR
"
}
# You will need to have write permission to the local installation directory.
# The local installation directory should be in your $PATH.
## Example value for the argument:
# install_dir="/path/for/installation/"
## Parse arguments from the command line
while [ "$1" != "" ]; do
case $1 in
-i | --install_dir ) shift
install_dir=$1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done
## Move to the install directory
cd ${install_dir}
## Insert install directory at front of PATH
install_dir=$( pwd)
export PATH="${install_dir}:${PATH}"
## Install Anaconda2
wget https://repo.anaconda.com/archive/Anaconda2-5.2.0-Linux-x86_64.sh
bash Anaconda2-5.2.0-Linux-x86_64.sh -b -p ${install_dir}/anaconda2
ln -s anaconda2/bin/python python
ln -s anaconda2/bin/conda conda
## Install pysam (Python package, not included with conda)
./conda install -c anaconda pysam
## Install biopython (Python package)
./conda install -c anaconda biopython
## Install regex (Python package)
./conda install -c anaconda regex
## Install MACS peak caller
./conda install -c bioconda macs2
ln -s anaconda2/bin/macs2 macs2
## Install pigz
wget http://zlib.net/pigz/pigz-2.4.tar.gz
tar -xzvf pigz-2.4.tar.gz
cd pigz-2.4
make
cp pigz unpigz ../
cd ../
rm -r pigz-2.4
## Install java/1.8
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/\
8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
#
tar -xzvf jdk-8u131-linux-x64.tar.gz
cp -r jdk1.8.0_131/jre/ .
yes | rm -r jdk1.8.0_131
ln -s jre/bin/java java
## Install perl/5.26.0
wget http://www.cpan.org/src/5.0/perl-5.26.0.tar.gz
tar -xzvf perl-5.26.0.tar.gz
cd perl-5.26.0
./Configure -des -Dprefix=${install_dir}
make
make test
make install
cd ..
yes | rm -r perl-5.26.0
## Install bedtools/2.26.0
wget https://github.com/arq5x/bedtools2/releases/download/v2.26.0/\
bedtools-2.26.0.tar.gz
#
tar -xzvf bedtools-2.26.0.tar.gz
cd bedtools2
make
cd bin
cp * ../../
cd ../../
rm -r bedtools2
## Install samtools/1.5
wget https://sourceforge.net/projects/samtools/files/samtools/1.5/\
samtools-1.5.tar.bz2
#
tar -xvjf samtools-1.5.tar.bz2
cd samtools-1.5
./configure --disable-lzma
make
cp samtools ../
cd ../
rm -r samtools-1.5
## Install R/3.2.1
wget http://lib.stat.cmu.edu/R/CRAN/src/base/R-3/R-3.2.1.tar.gz
tar -xzvf R-3.2.1.tar.gz
cd R-3.2.1
./configure --prefix=${install_dir} --with-x=no
make
cd ../
ln -s R-3.2.1/bin/R R