How to run local BLAST (Standalone NCBI BLAST+) with Python?
1
0
Entering edit mode
5.2 years ago
iggakami • 0

Hello, I'm new here, but I can't find answer in other topics.

I want to run blast nucelotide, align two sequences using blast (megablast, all options default) amd check their % ident. I have installed locally - Standalone NCBI BLAST+ (2.6). I've got Python 2.7, and installed BioPython, but after reading Biopython Tutorial (http://www.biopython.org/DIST/docs/tutorial/Tutorial.html) I still can't handle with this.

Could anyone show me example of using BioPython with local blast?

blast python biopython • 4.0k views
ADD COMMENT
2
Entering edit mode
5.2 years ago
Chen Sun ★ 1.1k

My solution is to not use biopython, but directly use python function subprocess:

simply using subprocess.call(command, shell=True), where command is any blast command you want to run locally.

Hope it helps.

ADD COMMENT
0
Entering edit mode

thank you with subprocess.check_output() this is perfect for me

ADD REPLY
0
Entering edit mode

What does the subprocess function do exactly? I looked up the docs, but couldnt figure out. Why wouldnt using BLAST from Biopython be a good idea?

ADD REPLY
1
Entering edit mode

it basically lets you interact with commandline things from within a script (command = what you would type into the commandline, formatted as a list). Biopython BLAST is basically the same except its easier to work with, but your limited to whatever options they put in to their wrapper function

ADD REPLY

Login before adding your answer.

Traffic: 1905 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