Question: Biopython Local Blast Giving Mega Blast Results
0
gravatar for muneezapatel
6.9 years ago by
muneezapatel0 wrote:

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 • 2.6k views
ADD COMMENTlink modified 5.8 years ago by Biostar ♦♦ 20 • written 6.9 years ago by muneezapatel0

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 REPLYlink written 6.9 years ago by Peter5.8k

OP muneezapatel has not been seen for the past year on the site. Will close this question unless OP accepts answer or provides feedback in a couple of days.

ADD REPLYlink written 5.8 years ago by RamRS30k
2
gravatar for a.zielezinski
6.9 years ago by
a.zielezinski9.2k
a.zielezinski9.2k wrote:

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 COMMENTlink written 6.9 years ago by a.zielezinski9.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2038 users visited in the last hour