-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstalldeps
executable file
·120 lines (101 loc) · 3.24 KB
/
Installdeps
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
#!/usr/bin/bash
source $HOME/.bashrc
conda create -n PHI -c conda-forge gxx_linux-64=13.2.0 make libstdcxx-ng cmake zlib bzip2 xz lz4 zstd -y
conda activate PHI
rm -rf ../extra
rm -rf temp_bin
mkdir -p temp_bin
cd temp_bin
mkdir -p ../extra
mkdir -p ../extra/plugins
mkdir -p ../extra/lib
mkdir -p ../extra/bin
mkdir -p ../extra/include
git clone https://github.com/jltsiren/gbwtgraph.git
git clone https://github.com/vgteam/sdsl-lite.git
git clone https://github.com/vgteam/libhandlegraph.git
git clone https://github.com/jltsiren/gbwt.git
git clone https://github.com/samtools/htslib.git
git clone https://github.com/samtools/samtools.git
git clone https://github.com/samtools/bcftools.git
# htslib
cd htslib
git submodule update --init --recursive
autoreconf -i
./configure --prefix=$(pwd)/../../extra
make -j4
make install
# samtools
cd ../samtools
autoheader
autoconf -Wno-syntax
./configure --prefix=$(pwd)/../../extra
make -j4
make install
cd ..
# bcftools
cd bcftools
make -j4
cp bcftools ../../extra/bin/
cp -r plugins/* ../../extra/plugins/
cd ..
wget --no-check-certificate https://packages.gurobi.com/11.0/gurobi11.0.2_linux64.tar.gz
tar -xvf gurobi11.0.2_linux64.tar.gz
cd gurobi1102/linux64
cp lib/* ../../../extra/lib/
cp include/* ../../../extra/include/
cd ../../
# zlib
wget --no-check-certificate https://zlib.net/current/zlib.tar.gz
tar -xvf zlib.tar.gz
cd zlib-*
./configure --prefix=$(pwd)/../../extra
make -j4
make install
cd ..
cd sdsl-lite
cd build
cmake .. && make -j4
cd ../..
cd libhandlegraph
mkdir -p build
cd build
cmake .. && make -j4 CPPFLAGS="-I../sdsl-lite/include" LDFLAGS="-L../sdsl-lite/build/lib/ -L../sdsl-lite/build/external/libdivsufsort/lib/"
cd ../..
cd gbwt
make -j4 CPPFLAGS="-I../sdsl-lite/include -I../libhandlegraph/src/include/" LDFLAGS="-L../sdsl-lite/build/lib/ -L../sdsl-lite/build/external/libdivsufsort/lib/ -L../libhandlegraph/build/"
cd ..
cd gbwtgraph
make CPPFLAGS="-I../sdsl-lite/include -I../gbwt/include -I../libhandlegraph/src/include/" \
LDFLAGS="-L../gbwt/lib -L../sdsl-lite/build/lib/ -L../sdsl-lite/build/external/libdivsufsort/lib/ -L../libhandlegraph/build/" -j4
cp bin/gfa2gbwt ../../extra/bin/
cp lib/* ../../extra/lib/
cd ..
cp gbwt/lib/* ../extra/lib/
cp sdsl-lite/build/lib/* ../extra/lib/
cp sdsl-lite/build/external/libdivsufsort/lib/* ../extra/lib/
cp libhandlegraph/build/libhandlegraph.a ../extra/lib/
cp libhandlegraph/build/libhandlegraph.so ../extra/lib/
# get vg
wget https://github.com/vgteam/vg/releases/download/v1.60.0/vg -O ../extra/bin/vg
chmod +x ../extra/bin/vg
cd ..
rm -rf temp_bin
# # Define the paths
# BIN_PATH="$(pwd)/extra/bin"
# LIB_PATH="$(pwd)/extra/lib"
# # Check if BIN_PATH is already in .bashrc
# if ! grep -q "$BIN_PATH" ~/.bashrc; then
# echo "Adding $BIN_PATH to PATH in .bashrc"
# echo "export PATH=\"$BIN_PATH:\$PATH\"" >> ~/.bashrc
# else
# echo "$BIN_PATH is already in PATH"
# fi
# # Check if LIB_PATH is already in .bashrc
# if ! grep -q "$LIB_PATH" ~/.bashrc; then
# echo "Adding $LIB_PATH to LD_LIBRARY_PATH in .bashrc"
# echo "export LD_LIBRARY_PATH=\"$LIB_PATH:\$LD_LIBRARY_PATH\"" >> ~/.bashrc
# else
# echo "$LIB_PATH is already in LD_LIBRARY_PATH"
# fi
# echo "Done! Paths are now updated and applied. Please source ~/.bashrc to apply the changes."