-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup_cg.sh
150 lines (130 loc) · 2.68 KB
/
setup_cg.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
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
#!/usr/bin/env bash
# Requirements:
# - perl
# - python 2 (including headers; python-dev package in ubuntu)
# - R
# - curl
# - GNU tar
# - GNU autotools
# - git
# - gcc
# GenomeRunner branch
branch=parallel
# Versions of software to be installed
declare -A versions
versions=(
[parallel]=latest
[kyotocabinet]=1.2.76
[redis]=2.8.17
[bedops]=v2.3.0
)
PREFIX=${PREFIX-$HOME/.local/}
export PATH=$PREFIX/bin:$PATH
mkdir -p $PREFIX/bin
#cd $(mktemp -d)
##########
# Binaries
##########
which parallel || {
v=${versions[parallel]}
curl http://ftp.gnu.org/gnu/parallel/parallel-${v} \
| tar xjvf -
cd parallel-${v}
./configure --prefix=$PREFIX
make install
cd -
}
which bedtools || {
git clone https://github.com/arq5x/bedtools.git
cd bedtools
make -j
cp bin/* $PREFIX/bin
cd -
}
which tabix || {
git clone https://github.com/samtools/tabix.git
cd tabix
make -j
cp tabix bgzip $PREFIX/bin
cd -
}
which kchashmgr || {
base=http://fallabs.com/kyotocabinet/pkg/
v=${versions[kyotocabinet]}
curl $base/kyotocabinet-${v}.tar.gz \
| tar xvzf -
cd kyotocabinet-${v}
./configure --prefix=$PREFIX
make -j
make install
cd -
}
which realpath || {
echo -e '#!/usr/bin/env bash\nreadlink -f "$@"' \
> $PREFIX/bin/realpath
chmod +x $PREFIX/bin/realpath
}
which redis-server || {
base=http://download.redis.io/releases/
v=${versions[redis]}
curl $base/redis-${v}.tar.gz \
| tar xvzf -
cd redis-${v}
make -j hiredis jemalloc linenoise lua
make PREFIX=$PREFIX install
}
which bedops || {
v=${versions[bedops]}
curl -L https://github.com/bedops/bedops/releases/download/$v/bedops_linux_x86_64-${v}.tar.bz2 \
| tar -xjvf - -C $PREFIX
}
cat <<'EOF' |
bedToBigBed
bedGraphToBigWig
bigWigInfo
bigWigSummary
bigWigToBedGraph
bigBedToBed
rowsToCols
EOF
while read p; do
base=http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/
which $p || {
curl -o $PREFIX/bin/$p $base/$p
chmod +x $PREFIX/bin/$p
}
done
#################
# Python packages
#################
which pip2 || {
python2 <(curl https://bootstrap.pypa.io/get-pip.py) --user
}
which cython2 || {
pip2 install --user cython
}
cat <<'EOF' |
cherrypy
numpy
scipy
rpy2
simplejson
mako
BeautifulSoup
celery
redis
EOF
while read r; do
python2 -c "import $r" || pip2 install --user -I $r
done
#######################
# GRTK and GenomeRunner
#######################
git clone https://github.com/mdozmorov/genome_runner.git
git checkout $branch
cd genome_runner/grtk
python2 setup.py install --user
cd ..
cd genome_runner
Rscript installer.R
python2 setup.py install --user