-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_dependencies.sh
executable file
·61 lines (45 loc) · 1.28 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
INSTALL_DIR=$1
# Check if $1 is empty
if [ -z "$1" ]; then
echo "Error: Missing install path."
exit 1
fi
TEMPDIR=$(mktemp -d)
BASHRC=$HOME/.bashrc
# CD-HIT Install
cd $TEMPDIR
wget https://github.com/weizhongli/cdhit/releases/download/V4.8.1/cd-hit-v4.8.1-2019-0228.tar.gz
tar -xzvf cd-hit-v4.8.1-2019-0228.tar.gz
cd cd-hit-v4.8.1-2019-0228
make
chmod u+x cd-hit
mkdir ${INSTALL_DIR%/}/cd_hit
cp cd-hit ${INSTALL_DIR%/}/cd_hit
EXPORT_CMD="export PATH=\$PATH:${INSTALL_DIR%/}/cd_hit"
echo "$EXPORT_CMD" >> "$BASHRC"
rm -rf "$TEMPDIR"
# RNAalign Install
TEMPDIR=$(mktemp -d)
cd $TEMPDIR
wget https://zhanggroup.org/RNA-align/bin/RNAalign.tar.bz2
tar -xvjf RNAalign.tar.bz2
cd RNAalign
g++ -O3 -ffast-math -o RNAalign RNAalign.cpp -static
chmod u+x ./RNAalign
mkdir ${INSTALL_DIR%/}/RNAalign
cp RNAalign $INSTALL_DIR/RNAalign
EXPORT_CMD="export PATH=\$PATH:${INSTALL_DIR%/}/RNAalign"
echo "$EXPORT_CMD" >> "$BASHRC"
rm -rf "$TEMPDIR"
# US-Align
TEMPDIR=$(mktemp -d)
cd $TEMPDIR
wget https://zhanggroup.org/US-align/bin/module/USalign.cpp
g++ -static -O3 -ffast-math -o USalign USalign.cpp
chmod u+x ./USalign
mkdir ${INSTALL_DIR%/}/USalign
cp USalign $INSTALL_DIR/USalign
EXPORT_CMD="export PATH=\$PATH:${INSTALL_DIR%/}/USalign"
echo "$EXPORT_CMD" >> "$BASHRC"
rm -rf "$TEMPDIR"
source $BASHRC