forked from jpuritz/dDocent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_dDocent.GATK_requirements
240 lines (211 loc) · 6.06 KB
/
install_dDocent.GATK_requirements
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#!/bin/bash
###Script to check for and install most of the required software for dDocent
if [[ -z "$1" ]]; then
echo "Correct usage is sh install_dDocent_requirements [directory in your computer or user PATH]"
echo "if installing for all users, best to run this script as root"
exit 1
fi
INSTALL_PATH=$1
if type -p java; then
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
_java="$JAVA_HOME/bin/java"
else
echo "no java"
fi
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo version "$version"
if [[ "$version" > "1.7" ]]; then
echo version is greater than 1.7
else
echo version is less than 1.7 please upgrade version
exit 1
fi
fi
echo "Checking for required software"
if [ -f $INSTALL_PATH/GenomeAnalysisTK.jar ]; then
echo "GATK is already installed"
else
echo "Please install GATK. Follow this link to download and install. http://www.broadinstitute.org/gatk/auth?package=GATK"
fi
echo "Checking for STACKS"
if which clone_filter >/dev/null; then
echo "STACKS is already installed"
else
echo "Downloading and installing STACKS components clone_filter and process_radtags"
curl -O http://creskolab.uoregon.edu/stacks/source/stacks-1.12.tar.gz
tar xvzf stacks-1.12.tar.gz
cd stacks-1.12
./configure
make
cp clone_filter process_radtags $INSTALL_PATH
cd ..
fi
echo "Checking for FreeBayes"
if which freebayes >/dev/null; then
echo "FreeBayes is already installed"
else
echo "Downloading and installing FreeBayes"
git clone --recursive git://github.com/ekg/freebayes.git
cd freebayes
make
cd bin
cp * $INSTALL_PATH
cd ..
cd ..
fi
echo "Checking for cutadapt"
if which cutadapt >/dev/null; then
echo "cutadapt is already installed"
else
"Downloading and installing cutadapt"
curl -O http://cutadapt.googlecode.com/files/cutadapt-1.2.1.tar.gz
tar xvzf cutadapt-1.2.1.tar.gz
cd cutadapt-1.2.1
python setup.py build
python setup.py build_ext -i
python setup.py install
cd ..
fi
echo "Checking for fastqc"
if which cutadapt >/dev/null; then
echo "fastqc is already installed"
else
"Downloading and installing fastqc"
curl -O http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.10.1.zip
unzip fastqc_v0.10.1.zip
cd FastQC
cp fastqc $INSTALL_PATH
cd ..
fi
echo "Checking for trim_galore"
if which trim_galore >/dev/null; then
echo "trim_galore is already installed"
else
"Downloading and installing trim_galore"
curl -O http://www.bioinformatics.babraham.ac.uk/projects/trim_galore/trim_galore_v0.3.3.zip
unzip trim_galore_v0.3.3.zip
cp trim_galore $INSTALL_PATH
fi
echo "Checking for mawk"
if which mawk >/dev/null; then
echo "mawk is already installed"
else
"Downloading and installing mawk"
curl -O http://invisible-island.net/datafiles/release/mawk.tar.gz
tar xvzf mawk.tar.gz
cd mawk-1.*
./configure
make
cp mawk $INSTALL_PATH
cd ..
fi
echo "Checking for bwa"
if which bwa >/dev/null; then
echo "bwa is already installed"
else
echo "Downloading and installing bwa"
git clone https://github.com/lh3/bwa.git
cd bwa
make
cp bwa $INSTALL_PATH
cd ..
fi
echo "Checking for samtools"
if which samtools >/dev/null; then
echo "samtools is already installed"
else
"Downloading and installing samtools"
curl -L -o samtools-0.x.tar.bz2 http://sourceforge.net/projects/samtools/files/latest/download?source=files
tar xvjf samtools-0.x.tar.bz2
cd samtools-0.1*
make
cp samtools $INSTALL_PATH
cd ..
fi
echo "Checking for VCFtools"
if which vcftools >/dev/null; then
echo "VCFtools is already installed"
else
echo "Downloading and installing VCFtools"
curl -L -o vcftools_x.tar.gz http://downloads.sourceforge.net/project/vcftools/vcftools_0.1.11.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fvcftools%2Ffiles%2F%3Fsource%3Dnavbar&ts=1398959218&use_mirror=hivelocity
tar xvzf vcftools_x.tar.gz
cd vcftools_0*
make
cp ./bin/vcftools $INSTALL_PATH
cd ..
fi
echo "Checking for Rainbow"
if which rainbow >/dev/null; then
echo "Rainbow is already installed"
else
echo "Downloading and installing Rainbow"
curl -L -o rainbow.x.tar.gz http://sourceforge.net/projects/bio-rainbow/files/latest/download?source=files
tar xvzf rainbow.x.tar.gz
cd rainbow_*
make
cp rainbow rbasm rbmergetag select_* $INSTALL_PATH
cd ..
fi
echo "Checking for seqtk"
if which seqtk >/dev/null; then
echo "seqtk is already installed"
else
echo "Downloading and installing seqtk"
git clone https://github.com/lh3/seqtk.git
cd seqtk
make
cp seqtk $INSTALL_PATH
cd ..
fi
echo "Checking for cd-hit"
if which cd-hit-est >/dev/null; then
echo "cd-hit is already installed"
else
echo "Downloading and installing cd-hit"
curl -O http://www.bioinformatics.org/downloads/index.php/cd-hit/cd-hit-v4.5.4-2011-03-07.tgz
tar xvzf cd-hit-v4.5.4-2011-03-07.tgz
cd cd-hit-v4.5.4-2011-03-07
make openmp=yes
cp cd-hit-est cd-hit-est-2d $INSTALL_PATH
cd ..
fi
echo "Checking for mergefq.pl"
if [ -f $INSTALL_PATH/mergefq.pl ]; then
echo "mergefq.pl already installed"
else
curl -O https://github.com/jpuritz/dDocent/raw/master/mergefq.pl
cp mergefq.pl $INSTALL_PATH
fi
echo "Checking for Seq_filter.pl"
if [ -f $INSTALL_PATH/Seq_filter.pl ]; then
echo "Seq_filter.pl already installed"
else
curl -O http://seq-filter.googlecode.com/files/Seq_filter.pl
cp Seq_filter.pl $INSTALL_PATH
fi
echo "Checking for cutseq_fasta.pl"
if [ -f $INSTALL_PATH/cutseq_fasta.pl ]; then
echo "cutseq_fasta.pl already installed"
else
curl -O http://nash-bioinformatics-codelets.googlecode.com/files/cutseq_fasta.pl
cp cutseq_fasta.pl $INSTALL_PATH
fi
echo "Checking for bedtools"
if which bamToBed >/dev/null; then
echo "bedtools is already installed"
else
curl -L -O https://github.com/arq5x/bedtools2/releases/download/v2.19.1/bedtools-2.19.1.tar.gz
tar xvzf bedtools-2.19.1.tar.gz
cd bedtools2-2.19.1
make
cd bin
cp * $INSTALL_PATH
cd ..
cd ..
fi
echo "Now installing dDocent"
curl -L -O https://github.com/jpuritz/dDocent/raw/master/dDocent.GATK
chmod +x dDocent.GATK
cp dDocent.GATK $INSTALL_PATH