Hello!
I'm trying to run a local BLAST with biopython using Bio.Blast.Applications. However, when running the below code:
from Bio.Blast.Applications import NcbiblastpCommandline
result = r"C:\Users\Uzytkownik\Desktop\tests\result.xml"
q = r"C:\Users\Uzytkownik\Desktop\tests\fastas\my_example2.faa"
database = r"C:\Users\Uzytkownik\Desktop\tests\my_examplemultif.faa"
blastp_cline = NcbiblastpCommandline(query = q, db = database, evalue = 0.001, outfmt=5, out = result)
stdout, stderr = blastp_cline()
I receive an error stating:
ApplicationError: Non-zero return code 1 from 'blastp -out C:\\Users\\Uzytkownik\\Desktop\\tests\\result.xml -outfmt 5 -query C:\\Users\\Uzytkownik\\Desktop\\tests\\fastas\\my_example2.faa -db C:\\Users\\Uzytkownik\\Desktop\\tests\\my_examplemultif.faa -evalue 0.001', message "'blastp' is not recognized as an internal or external command,"
When I run the query through the command line everything works fine (I'm using blast 2.9.0+), so I'm really not sure what the issue is. Would be gratefull for any help!
blastp
is not available in yourPATH
. Since this appears to be windows you will need to amend PATH accordingly (or provide full path to theblastp
executable).idk if it can help, when I run blast inside python, I put (example with blastx):
my blast version: Translated Query-Protein Subject BLAST 2.9.0+