/
blastkit.txt
96 lines (64 loc) · 2.34 KB
/
blastkit.txt
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
============================
BLASTing your assembled data
============================
One thing everyone wants to do is BLAST sequence data, right? Here's a
simple way to set up a stylish little BLAST server that lets you search
your newly assembled sequences.
Installing blastkit
-------------------
Installing some prerequisites::
pip install pygr
pip install whoosh
pip install git+https://github.com/ctb/pygr-draw.git
pip install screed
apt-get -y install lighttpd
and configure them::
cd /etc/lighttpd/conf-enabled
ln -fs ../conf-available/10-cgi.conf ./
echo 'cgi.assign = ( ".cgi" => "" )' >> 10-cgi.conf
echo 'index-file.names += ( "index.cgi" ) ' >> 10-cgi.conf
/etc/init.d/lighttpd restart
Next, install BLAST::
cd /root
curl -O ftp://ftp.ncbi.nih.gov/blast/executables/release/2.2.24/blast-2.2.24-x64-linux.tar.gz
tar xzf blast-2.2.24-x64-linux.tar.gz
cp blast-2.2.24/bin/* /usr/local/bin
cp -r blast-2.2.24/data /usr/local/blast-data
And put in blastkit::
cd /root
git clone https://github.com/ctb/blastkit.git -b ec2
cd blastkit/www
ln -fs $PWD /var/www/blastkit
mkdir files
chmod a+rxwt files
chmod +x /root
and run check.py::
cd /root/blastkit
python ./check.py
It should say everything is OK.
Adding the data
---------------
Take an assembly of interest, and copy it into /root/blaskit/db/db.fa; e.g. ::
cp /mnt/assembly/ecoli-k31.fa /root/blastkit/db/db.fa
Formatting the database
~~~~~~~~~~~~~~~~~~~~~~~
After you've done either of the above, format and install the database
for blastkit::
cd /root/blastkit
formatdb -i db/db.fa -o T -p F
python index-db.py db/db.fa
Done!
.. note::
You can install any file of DNA sequences you want this way; just copy
it into /root/blastkit/db/db.fa and run the indexing commands, above.
Running blastkit
----------------
Figure out what your machine name is
(ec2-???-???-???-???.compute-1.amazonaws.com) and go to::
http://machine-name/blastkit/
Make sure you have enabled port 80 in your security settings on Amazon.
...and you should see a BLAST page. If you're searching E. coli, try::
IRHEQEAFVLHGRLQGEERETAIGLTKDKQGDSKVRIDGTDGHKVAELAHLMPMQLITPE
GFTLLNGGPKYRRAFLDWGCFHNEPGFFTAWSNLKRLLKQRNAALRQVTRYEQLRPWDKE
LIPLAEQISTWRAEYSAGIAADMADTCKQFLPEFSLTFSFQRGWEKETEYAEVLERNFER
which should return a match.