-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure
executable file
·101 lines (70 loc) · 2.78 KB
/
configure
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
#########################################################################
# File Name:configure.sh
# Author:Cheng Yang
# Description: configure LncADeep
#########################################################################
#!/bin/bash
#set -x
# 1. Pre-requisite for LncADeep: lncRNA identification:
# ---------------------------
echo "Pre-requisite for lncRNA identification:"
echo "1. Python, version >= 2.7.6"
echo "2. numpy, version >= 1.8.2"
echo "3. HMMER package: can be downloaded from http://hmmer.org/download.html"
echo "-------------------------------------------"
# 2. Pre-requisite for LncADeep: predict lncRNA-protein interactions and conduct function annotations:
# ---------------------------
echo "Pre-requisite for lncRNA functional annotations:"
echo "1. Python 2, version >= 2.7.6"
echo "2. numpy, version >= 1.8.2"
echo "3. theano, version >= 0.8.2"
echo "4. pandas, version >= 0.18.0"
echo "5. Keras, version 1.2.2 (https://github.com/fchollet/keras). Please install Keras according to the online installation manual."
echo "6. MCL package: https://micans.org/mcl/"
echo "7. iGraph R package (optional): http://igraph.org/r/"
echo "-------------------------------------------"
# 3. pre-defined variables
# ------------------------
workdir=`pwd`
readonly workdir
echo "The working directory is $workdir"
# 4. Install HMMER 3.1b2
# ----------------------
echo "Check HMMER"
HMMERdir=$workdir/LncADeep_lncRNA/src
HMMERexe=$workdir/LncADeep_lncRNA/src/hmmsearch
chmod +x $HMMERexe
echo "export PATH=\$PATH:$HMMERdir" >> $HOME/.bash_profile
if [ ! -f "$HMMERexe" ]; then
cd $HMMERdir
wget http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2-linux-intel-x86_64.tar.gz
hmm_target_file="hmmer-3.1b2-linux-intel-x86_64.tar.gz"
hmm_target_dir="hmmer-3.1b2-linux-intel-x86_64"
tar xzvf $hmm_target_file -C $HMMERdir
hmm_bin_dir=$HMMERdir/$hmm_target_dir/binaries
echo $hmm_bin_dir
echo "export PATH=\$PATH:$hmm_bin_dir" >> $HOME/.bash_profile
fi
# 5. Check Pfam database
# -------------------------
echo "Check Pfam 29.0 database"
pfam_dir=$workdir/LncADeep_lncRNA/src
cd $pfam_dir
pfam_file="Pfam-A.hmm.gz"
pfam_target="$pfam_dir"/"Pfam-A.hmm"
if [ ! -f "$pfam_target" ]; then
cd $pfam_dir
wget ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam29.0/Pfam-A.hmm.gz
gzip -d $pfam_file
fi
# 6. Add directory to environment path
# -------------------------
LncADeep_src_dir=$workdir/LncADeep_anno/src
chmod +x -R $LncADeep_src_dir
echo "export PATH=\$PATH:$LncADeep_src_dir" >> $HOME/.bash_profile
# 7. Add LncADeep to environment path
# ------------------------------------------
cd $workdir
echo "export PATH=\$PATH:$workdir" >> $HOME/.bash_profile
echo "Please run the following command to complete installation:"
echo "source \$HOME/.bash_profile"