How To Blast Against A Local Database
2
1
Entering edit mode
11.0 years ago
mealbahrani ▴ 10

I want to BLAST an mRNA reference sequence against a local database in my directory (a collection of RNA reference sequences) using a BioPython program. I know how to perform BLAST against online database such as NCBI database using the following code:

from Bio.Blast import NCBIWWW

sequence = """GGAGGATATATTCAAC"""

blast_handle = NCBIWWW.qblast('blastn', 'nr', sequence)

    blast_handle.seek(0)
    blast_file = open('blast-output.xml', 'w')
    blast_file.write(blast_handle.read())
    blast_file.close()

But my question is how to do BLAST against a local database in my directory?

blast biopython local database • 15k views
ADD COMMENT
7
Entering edit mode
11.0 years ago
David W 4.9k

This is covered in the Biopython tutorial under the heading "Running BLAST Locally". You'll need to install the BLAST executables, then follow the examples. If you'd prefer, you can run the create your databases and run your BLASTs via the command line, then use Biopython to parse the resulting xml.

ADD COMMENT
2
Entering edit mode
11.0 years ago
Bioch'Ti ★ 1.1k

You can also use PrfectBlast, a GUI that perform this task whatever your platform is: http://code.google.com/p/prfectblast/ Easier to handle for people that do not use python/perl.

ADD COMMENT

Login before adding your answer.

Traffic: 2072 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6