-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·225 lines (209 loc) · 5.81 KB
/
setup.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
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
#!/usr/bin/env bash
echo "Following is a partial listing or required components to compile and use the PRFdb."
echo "1. gcc (to compile everything)"
echo "2. g++ (to compile HotKnots)"
echo "3. bison (to compile rnamotif)"
echo "4. perl"
echo "5. flex (to compile rnamotif, unafold, Vienna)"
echo "6. libgd (for graphing routines)"
echo "7. java (for jViz)"
echo "8. Appropriate headers for c, c++"
echo "9. Apache (if you wish to run a webserver"
sleep 1
if [ ! -n "$PRFDB_HOME" ]; then
echo "The environment variable PRFDB_HOME is not set."
echo "Please set it. Temporarily setting it to $PWD"
echo "Unless you set it, future invocations of the prfdb will fail."
echo "To set it, type the following two commands:
echo \"export PRFDB_HOME=$PWD\" >> ~/.bashrc
. ~/.bashrc
"
export PRFDB_HOME=$PWD
sleep 5
fi
echo "Running fixdeps to set up the perl dependencies."
${PRFDB_HOME}/fixdeps.pl
mkdir -p ${PRFDB_HOME}/bin/params ${PRFDB_HOME}/bin/TestSeq
ln -s ${PRFDB_HOME}/bin/params ${PRFDB_HOME}/work/params
ln -s ${PRFDB_HOME}/bin/TestSeq ${PRFDB_HOME}/work/TestSeq
cd src/
CONFIGURE_CMD="./configure --prefix=$PRFDB_HOME --bindir=$PRFDB_HOME/bin"
echo "Please see the AUTHORS file for the authors of software upon which the PRFdb depends."
for source in `cat $PRFDB_HOME/src/MANIFEST`
do
echo "Untarring $source"
tar zxf $source
done
RET=0
echo "Copying jviz and xvfb to $PRFDB_HOME/bin"
cp $PRFDB_HOME/src/jViz.jar $PRFDB_HOME/bin
cp $PRFDB_HOME/src/xvfb-run $PRFDB_HOME/bin
if [ -r $PRFDB_HOME/bin/Hotknot ]; then
echo "Hotknots is already installed."
else
echo "Installing HotKnots"
cd $PRFDB_HOME/src/HotKnots_v2.0
cp bin/HotKnot $PRFDB_HOME/bin
cp bin/params/* $PRFDB_HOME/bin/params
## hotknots expects some text files for its parambeters, they live in both the 'TestSeq' and 'params' directories
rsync -av ${PRFDB_HOME}/src/HotKnots_v2.0/bin/params/ ${PRFDB_HOME}/bin/params
rsync -av ${PRFDB_HOME}/src/HotKnots_v2.0/bin/TestSeq/ ${PRFDB_HOME}/bin/TestSeq
fi
if [ -r $PRFDB_HOME/bin/Fold.out.nopairs ]; then
echo "Nupack is already installed."
else
echo "Installing a slightly hacked version of NUPACK"
cd $PRFDB_HOME/src/NUPACK1.2_pseudoknot/source
make clean ; make
RET=$?
cp Fold.out $PRFDB_HOME/work/Fold.out.nopairs
cp $PRFDB_HOME/src/NUPACK1.2_pseudoknot/data* $PRFDB_HOME/work
ln -s $PRFDB_HOME/work/Fold.out.nopairs $PRFDB_HOME/bin/
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/NUPACK1.2_pseudoknot
fi
fi
if [ -r $PRFDB_HOME/bin/Fold.out.boot.nopairs ]; then
echo "Pseudoknot-less nupack is already installed."
else
echo "... and another version of nupack."
cd $PRFDB_HOME/src/NUPACK1.2_no_pseudoknot/source
make clean ; make
RET=$?
cp Fold.out $PRFDB_HOME/work/Fold.out.boot.nopairs
ln -s $PRFDB_HOME/work/Fold.out.boot.nopairs $PRFDB_HOME/bin/
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/NUPACK1.2_pseudoknot
fi
fi
if [ -r $PRFDB_HOME/bin/rnamotif ]; then
echo "rnamotif is already installed."
else
echo "Installing rnamotif."
cd $PRFDB_HOME/src/rnamotif-3.0.7
make clean ; make
RET=$?
cd src
make
EXECS="efn2_drv efn_drv rm2ct rmfmt rmprune rnamotif"
for i in $EXECS
do
cp $i $PRFDB_HOME/bin
done
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/rnamotif-3.0.7
fi
fi
if [ -r $PRFDB_HOME/bin/shuffle ]; then
echo "squid is already installed."
else
echo "Installing the squid nucleic acid routines."
cd $PRFDB_HOME/src/squid-1.9g
$CONFIGURE_CMD
make
RET=$?
EXECS="afetch alistat compalign compstruct revcomp seqsplit seqstat sfetch shuffle sindex sreformat translate weight"
for i in $EXECS
do
cp $i $PRFDB_HOME/bin
done
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/squid-1.9g
fi
fi
if [ -r $PRFDB_HOME/bin/pknots ]; then
echo "pknots is already installed."
else
echo "Installing pknots."
cd $PRFDB_HOME/src/pknots_v1.07
cd easel
make
cd ..
make
RET=$?
cp src/pknots $PRFDB_HOME/bin
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/pknots_v1.07
fi
fi
if [ -r $PRFDB_HOME/bin/RNAeval ]; then
echo "Vienna is at least partially installed."
else
echo "Installing ViennaRNA."
cd $PRFDB_HOME/src/ViennaRNA-1.7.2
$CONFIGURE_CMD
make
cd Progs
make ; make install
RET=$?
cd ../Readseq
cp readseq ../../../work
cd ../Kinfold
make ; make install
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/ViennaRNA-1.7.2
fi
fi
if [ -r $PRFDB_HOME/bin/miranda ]; then
echo "miranda is already installed."
else
echo "Installing miRanda."
cd $PRFDB_HOME/src/miRanda-3.3a
$CONFIGURE_CMD
make ; make install
RET=$?
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/miRanda-3.3a
fi
fi
if [ -r $PRFDB_HOME/bin/RNAhybrid ]; then
echo "RNAhybrid is already installed."
else
echo "Installing RNAhybrid."
cd $PRFDB_HOME/src/RNAhybrid-2.1
$CONFIGURE_CMD
make ; make install
RET=$?
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/RNAhybrid-2.1
fi
fi
## Unafold took over for mfold, don't do this anymore
#if [ -r $PRFDB_HOME/bin/mfold ]; then
# echo "mfold is already installed."
#else
# echo "Installing mFold."
# cd $PRFDB_HOME/src/mfold-3.5
# $CONFIGURE_CMD
# make ; make install
# RET=$?
# if [ -n $RET ]; then
# cd $PRFDB_HOME/src
# rm -rf $PRFDB_HOME/src/mfold-3.5
# fi
#fi
if [ -r $PRFDB_HOME/bin/UNAFold.pl ]; then
echo "unafold is already installed."
else
echo "Installing Unafold."
cd $PRFDB_HOME/src/unafold-3.8
$CONFIGURE_CMD
make ; make install
RET=$?
if [ -n $RET ]; then
cd $PRFDB_HOME/src
rm -rf $PRFDB_HOME/src/unafold-3.8
fi
fi
touch $PRFDB_HOME/backup/prfdb_test_1
touch $PRFDB_HOME/backup/prfdb_test_2
echo "Please run something like:
sudo chown -R www-data:www-data $PRFDB_HOME"