-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprogram_installation.sh
executable file
·115 lines (84 loc) · 2.95 KB
/
program_installation.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
#!/bin/bash
PROGRAMS_DIR=$HOME/programs
mkdir -p ${PROGRAMS_DIR};
SOURCE_DIR=$HOME/src
mkdir -p ${SOURCE_DIR};
# Downloading Anaconda
cd ${SOURCE_DIR}
wget https://repo.continuum.io/archive/Anaconda2-4.3.0-Linux-x86_64.sh
# Install Anaconda
ANACONDA_DIR=${PROGRAMS_DIR}/anaconda2
bash Anaconda2* -b -p ${ANACONDA_DIR}
# Add Anaconda to path
export PATH=${ANACONDA_DIR}/bin:$PATH
# Update pip
pip install --upgrade pip
# Install a gcc compiler
conda install libgcc --yes
export LD_LIBRARY_PATH=${ANACONDA_DIR}/lib:$LD_LIBRARY_PATH
# Install R in Anaconda
conda install -c r r-essentials --yes
export R_HOME=${ANACONDA_DIR}/lib/R/
# Install another python kernel
python -m ipykernel install --user
# Install biopython
conda install -c anaconda biopython=1.68 --yes
# Install Onecodex command line
pip install onecodex
# Install ete3 for NCBI Taxonomy database
conda install -c etetoolkit ete3=3.0.0b36 --yes
# Install further R dependencies
conda install -c r rpy2=2.8.5 --yes
conda install -c jdreaver libxdmcp=1.0.2 --yes
# For FastQC install java through anaconda
conda install -c cyclus java-jdk=8.45.14 --yes
conda install -c anaconda javabridge=1.0.14 --yes
# Update LD_LIBRARY_PATH for Java
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ANACONDA_DIR}/jre/lib/amd64
# Set the Java home
JAVA_HOME=${ANACONDA_DIR}/jre
# Install FastQC
wget http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.6.devel.zip
unzip fastqc*
chmod +x FastQC/fastqc
mv FastQC ${PROGRAMS_DIR}
# Add FastQC to PATH
PATH=$PATH:${PROGRAMS_DIR}/FastQC
# Install Samtools
conda install -c bioconda samtools=1.3.1 --yes
# Install IGV for viewing through Jupyter notebooks
pip install igv
# Install Jupyter IGV Extension
jupyter nbextension install --py igv --user
# Enable Jupyter IGV Extension
jupyter nbextension enable igv --py --user
# Install poretools
git clone https://github.com/arq5x/poretools
cd poretools
python setup.py install
cd $HOME
# Edit poretools to use matplotlib
PORETOOLS_DIR="/home/researcher/programs/anaconda2/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools"
perl -p -i -e "s/^\#matplotlib/matplotlib/" ${PORETOOLS_DIR}/hist.py
perl -p -i -e "s/^\#matplotlib/matplotlib/" ${PORETOOLS_DIR}/yield_plot.py
# Install bwa mem
conda install -c bioconda bwa=0.7.15 --yes
# Install Bedtools
conda install -c bioconda bedtools=2.26.0 --yes
# Install bamtools
conda install -c bioconda bamtools=2.4.0 --yes
# Install Krona
cd ${SOURCE_DIR}
git clone https://github.com/marbl/Krona/
cd Krona/KronaTools/
./install.pl --prefix=${PROGRAMS_DIR}/krona
PATH=$PATH:${PROGRAMS_DIR}/krona/bin
cd $HOME
### Do not install any programs past this line. ####
# Write accumulated PATH and LD_LIBRARY_PATH to the bash profile
echo "#!/bin/bash" >> ~/.bash_profile
echo "export PATH=$PATH" >> ~/.bash_profile
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> ~/.bash_profile
echo "export R_HOME=$R_HOME" >> ~/.bash_profile
echo "export JAVA_HOME=$JAVA_HOME" >> ~/.bash_profile
source ~/.bash_profile