BioPython local blast different results than blast+ local blast
0
0
Entering edit mode
6.5 years ago

Hi quick question!

I've done the same blast (tblastn) twice, the first one with the blast+ module and the second one with the standalone NCBI blast+ suite. Which uses the same blast module according to the cookbook. Though both give different results and as far as I can see the parameters are the same. Anybody know why? Am I missing something?

Thanks in advance!

blast biopython blast+ python • 2.5k views
ADD COMMENT
0
Entering edit mode

If you mean standalone BLAST by

the blast+ module

then you might want to check the version of local BLAST databases as using the different versions of the BLAST DBs would give you different output.

ADD REPLY
0
Entering edit mode

Thanks for the quick reply,

I forgot to mention I blast fasta against fasta. Not against a database.

ADD REPLY
0
Entering edit mode

You can make any fasta into a blast database with makeblastdb

ADD REPLY
0
Entering edit mode

Thank you, but I don't think that's helpful and it doesn't explain why I get two different results.

ADD REPLY
0
Entering edit mode

Is it possible to provide an example of a query and the corresponding output e.g. in the BLAST tabular format that would help clarify what you mean by different results?

ADD REPLY
0
Entering edit mode

Hi I accidentally replied to you in another answer

ADD REPLY
0
Entering edit mode

Ofcourse! Here is my standalone BLAST commandline:

tblastn -query fasta1.fna -subject fasta2.faa -out outputfile.txt

the python code i use to from biopython:

from Bio.Blast.Applications import NcbitblastnCommandline
cline = NcbitblastnCommandline(query=QUERY, subject=SUBJECT, outfmt=5, out=out_file)
cline()

I now see that my BioPython code's output is in XML format and my commandline is in pairwise (the standard). If i add the "-outfmt 5" to the commandline I get the same result as my BioPython code but it's different as with the pairwise. Now my question is why? Still thank you! I guess this solved my problem and brought me to another

ADD REPLY
0
Entering edit mode

Maybe top BLAST hits were not in the same order? You could get output in the tabular BLAST format using -outfmt 6 option and parse the hits for each query and check if it is just the order that was different or there were discrepancies in the corresponding evalue and bitscore.

ADD REPLY
0
Entering edit mode

Thank you for your help, I already fixed it by changing the output to XML. With both outputs as XML the evalues and hits were exactly the same!

ADD REPLY

Login before adding your answer.

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