-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall_MacOSX.sh
executable file
·111 lines (99 loc) · 3.21 KB
/
install_MacOSX.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
#!/bin/bash
# Install zika-seq requirements -- MacOSX
if [[ -z "$(which wget)" ]]
then
echo "Installing wget"
brew install wget
if [[ -z "$(which wget)" ]]
then
echo "Successfully intalled wget"
else
echo "Error installing wget: skipping for now."
echo "Make sure that wget is properly installed if Albacore, Porechop, or Nanopolish fail to install."
fi
else
echo "Wget already installed"
fi
## Install Miniconda3
if [[ -z "$(which conda)" ]]
then
echo "Installing Miniconda"
CONDA_SCRIPT=Miniconda3-latest-MacOSX-x86_64.sh
CONDA_DIR=$HOME/miniconda3
wget https://repo.continuum.io/miniconda/$CONDA_SCRIPT
bash $CONDA_SCRIPT -b -p $CONDA_DIR
CONDA_BIN_DIR=$CONDA_DIR/bin
export PATH=$CONDA_BIN_DIR:$PATH
if [[ -z "$(which conda)" ]]
then
echo "Successfully installed Miniconda"
else
echo "Error installing Miniconda: skipping for now"
fi
else
echo "Miniconda already installed"
fi
## Create environment in which snakemake will be run
echo "Installing conda environment: zika-seq"
conda env create -f envs/anaconda.snakemake-env_MacOSX.yaml
echo "Installing conda environment: zika-seq_pipeline"
conda env create -f envs/anaconda.pipeline-env.yaml
## Install albacore
if [[ -z "$(which read_fast5_basecaller.py)" ]]
then
echo "Installing Albacore"
# Edit this line with path to Albacore wheel file downloaded from https://community.nanoporetech.com/downloads
# We recommend creating a zika-seq/albacore directory and downloading to that directory
pip3 install albacore/ont_albacore-xxx_x86_64.whl || echo "Please donwload Albacore wheel file from https://community.nanoporetech.com/downloads and update install_macOSX.sh line 38 as appropriate."
if [[ -z "$(which read_fast5_basecaller.py)" ]]
then
echo "Successfully installed Albacore"
else
echo "Error installing Albacore: skipping for now"
fi
else
echo "Albacore already installed"
fi
## Install Porechop
if [[ -z "$(which porechop)" ]]
then
git clone https://github.com/rrwick/Porechop.git && cd Porechop && python3 setup.py install
if [[ -z "$(which porechop)" ]]
then
echo "Successfully installed Porechop"
else
echo "Error installing Porechop: skipping for now"
fi
else
echo "Porechop already installed"
fi
## Install Nanopolish
if [[ -z "$(which nanopolish)" ]]
then
git clone --recursive https://github.com/jts/nanopolish.git && cd nanopolish && make CXX=g++-7 CC=gcc-7 && cd ..
NANOPOLISH_BIN_DIR=$PATH/nanopolish/bin
export PATH=$NANOPOLISH_BIN_DIR:$PATH
if [[ -z "$(which nanopolish)" ]]
then
echo "Successfully installed Nanopolish"
else
echo "Error installing Nanopolish: skipping for now"
fi
else
echo "Nanopolish already installed"
fi
echo "Building data directories and downloading test data"
mkdir -p data/usvi-library8-1d-2017-03-31/process/demux
mkdir data/usvi-library8-1d-2017-03-31/raw_reads
mkdir data/usvi-library8-1d-2017-03-31/basecalled_reads
mkdir build
## Extract test data
echo "Downloading and extracting example dataset"
cd data/usvi-library8-1d-2017-03-31/raw_reads/ && wget https://s3.amazonaws.com/trvrb/zika_seq_example.tar.gz
pwd
tar xvzf zika_seq_example.tar.gz
rm zika_seq_example.tar.gz
echo "Cleaning up"
rm -rf Porechop/
rm -rf $CONDA_SCRIPT
echo "Done!"