-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
executable file
·117 lines (83 loc) · 2.1 KB
/
install.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
#!/bin/bash
#THIS INSTALLATION REQUIRES GCC, GIT, MAKE, CMAKE
function help {
echo "BCOOL installation script"
echo "This installation requires GCC>=4.9, GIT, MAKE and CMAKE3"
echo "-f absolute path of folder to put the binaries"
echo "-t to use multiple thread for compilation (default 8)"
}
#~ mkdir src;
#~ cd src;
threadNumber=8
folder=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
folder+="/bin"
while getopts "hf:t:" opt; do
case $opt in
h)
help
exit
;;
f)
echo "use folder: $OPTARG" >&2
folder=$OPTARG
;;
t)
echo "use $OPTARG threads" >&2
threadNumber=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
if [ -z "$folder" ]; then
help
exit 0
fi
mkdir $folder;
echo "I put binaries in $folder";
cat src/Bcool_header.py>Bcool
echo "BCOOL_INSTDIR = (\"$folder\")" >> Bcool
cat src/Bcool_broken.py>>Bcool
chmod +x Bcool
cd src;
git clone --recursive https://github.com/bcgsc/ntCard >>logCompile 2>>logCompile;
cd ntCard;
./autogen.sh >>logCompile 2>>logCompile;
./configure CFLAGS='-g -O3' CXXFLAGS='-g -O3' >>logCompile 2>>logCompile;
make -j $threadNumber >>logCompile 2>>logCompile;
cp ntcard $folder;
cd ..;
echo PHASE ONE, kmer spectrum estimator ntcard;
git clone --recursive https://github.com/GATB/bcalm >>logCompile 2>>logCompile;
cd bcalm;
mkdir build; cd build;
cmake -DKSIZE_LIST="32 64 128 256" .. >>logCompile 2>>logCompile;
make -j $threadNumber >>logCompile 2>>logCompile;
cp bcalm $folder;
cd ../..;
echo PHASE TWO, GRAPH CONSTRUCTION: BCALM;
git clone https://github.com/Malfoy/BGREAT2 >>logCompile 2>>logCompile;
cd BGREAT2;
make -j $threadNumber >>logCompile 2>>logCompile;
cp bgreat $folder;
cd ..;
echo PHASE THREE, READ MAPPING ON THE DBG: BGREAT;
git clone https://github.com/Malfoy/BTRIM >>logCompile 2>>logCompile;
cd BTRIM;
make -j $threadNumber >>logCompile 2>>logCompile;
if [ $? -ne 0 ]
then
echo "there was a problem with btrim compilation, check logs"
exit 1
fi
cp btrim $folder;
cd ..;
echo PHASE FOUR GRAPH CLEANING: BTRIM;
cd ..;
echo The end !;