-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprepare_3rd_party_dbs.sh
executable file
·60 lines (54 loc) · 1.88 KB
/
prepare_3rd_party_dbs.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
#!/bin/bash
cd ./data
if [ ! -d tmp ]; then
mkdir tmp
fi
cd ./tmp
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
OS='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
OS='macos'
fi
########### Pfam #############
if [ ! -f ../db/Pfam-A.hmm ]; then
echo "Downloading Pfam..."
curl -o ../db/Pfam-A.full.gz 'ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam27.0/Pfam-A.full.gz'
curl -o ../db/Pfam-A.hmm.gz 'ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam27.0/Pfam-A.hmm.gz'
gzip -d ../db/Pfam-A.hmm.gz
../bin/hmmpress.$OS ../db/Pfam-A.hmm
fi
########### TIGRFAMS #############
if [ ! -f ../db/TIGRFAMs_15.0_HMM.LIB ]; then
echo "Downloading TIGRFAMs..."
curl -o ../db/TIGRFAMs_15.0_HMM.LIB.gz 'ftp://ftp.jcvi.org/pub/data/TIGRFAMs/TIGRFAMs_15.0_HMM.LIB.gz'
gzip -d ../db/TIGRFAMs_15.0_HMM.LIB.gz
../bin/hmmpress.$OS ../db/TIGRFAMs_15.0_HMM.LIB
fi
########### CDD #############
if [ ! -f ../db/Cdd.rps ]; then
echo "Downloading CDD..."
curl -o ../db/cddid.tbl.gz 'ftp://ftp.ncbi.nlm.nih.gov/pub/mmdb/cdd/cddid.tbl.gz'
curl -o cdd.tar.gz 'ftp://ftp.ncbi.nlm.nih.gov/pub/mmdb/cdd/cdd.tar.gz'
mkdir smp
cd smp
# need to do this in multiple steps so we don't run out of disk space
tar --wildcards -xf ../cdd.tar.gz 'COG*.smp'
ls -1 COG*.smp > Cog
../../bin/makeprofiledb.$OS -in Cog -threshold 9.82 -scale 100.0 -dbtype rps -index true
mv Cog* ../../db
rm *.smp
tar --wildcards -xf ../cdd.tar.gz 'smart*.smp'
ls -1 smart*.smp > Smart
../../bin/makeprofiledb.$OS -in Smart -threshold 9.82 -scale 100.0 -dbtype rps -index true
mv Smart* ../../db
rm *.smp
tar --wildcards -xf ../cdd.tar.gz 'cd*.smp'
ls -1 cd*.smp > Cdd
../../bin/makeprofiledb.$OS -in Cdd -threshold 9.82 -scale 100.0 -dbtype rps -index true
mv Cdd* ../../db
rm *.smp
cd ..
rm -rf smp
rm cdd.tar.gz
fi