Biopython Local Blast Giving Mega Blast Results
1
0
Entering edit mode
11.0 years ago

Hello Everyone, I am trying to use the stand alone local blast in python to return back to make the blast results of particular sequences. It works but when I tally my results with the online version of blast it seems like the standalone blast is returning to me the "megablast- highly similar sequences" instead of blastn - somewhat similar sequences which is what I want.

This is my code:

 result_handlel= NcbiblastnCommandline(query="l70.fasta", db = "MG1655", out = 'resultl.xml', outfmt= 5, evalue = 0.0001)
    os.system(str(result_handlel))

Do you have any idea why it is doing this? It is the blastn command line so it makes most sense for it to return blastn results.

Thank you!

biopython blast • 3.9k views
ADD COMMENT
0
Entering edit mode

Note NcbiblastnCommandline(...) does not give you a handle so storing it in a variable called result_handlel is a bit odd. Also you can invoke it directly with:

stdout, stderr = result_handlel()
ADD REPLY
2
Entering edit mode
11.0 years ago

In BLAST+ the default program for blastn is megablast. To switch to regular blastn just add keyword argument task="blastn" to your command:

 result_handlel= NcbiblastnCommandline(query="l70.fasta", db = "MG1655", out = 'resultl.xml', outfmt= 5, evalue = 0.0001, task="blastn")
ADD COMMENT

Login before adding your answer.

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