Trouble with blastp against a local database (BioPython)
1
0
Entering edit mode
7.5 years ago

I've been having a ton of trouble trying to blastp my file of four protein sequences against a local database of protein sequences. I've been working on this for three days now using the BioPython manual and several fixes I found on the internet, but nothing has worked for me. My issue is that the command runs, but no results file is created.

Currently, this is what I have:

from Bio import SeqIO
from Bio.Blast.Applications import NcbiblastpCommandline

blast_handle = NcbiblastpCommandline(query='PATH/to/genes_of_interest.fasta', db='/PATH/to/local/db/protein.fa', out='PATH/to/results.xml')

When I print blast_handle, I get this:

blastp -out /PATH/to/results.xml -query /PATH/to/genes_of_interest.fasta -db /PATH/to/local/db/protein.fa

However, when I go to /PATH/to/, results.xml is nowhere to be found.

Any help would be much appreciated!

BioPython blastp blast blast local database • 2.4k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

I changed it last week (in my .bash_profile), plus wouldn't it give me an error if it couldn't find the PATH? instead of running the command and just not making an output file

ADD REPLY
0
Entering edit mode

Have you verified your blastp install and made sure the command is working outside of biopython?

ADD REPLY
0
Entering edit mode

Yes, blastp works fine outside of BioPython; I changed the PATH in my .bash_profile and tested it out last week.

ADD REPLY
0
Entering edit mode
7.5 years ago

I figured it out! After the NcbiblastpCommandline() function, you need to have:

stdout, stderr = blast_handle()

hopefully this will help someone else! Thanks for the replies!

ADD COMMENT

Login before adding your answer.

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