Question: Problem With Blastp Of Biopython: Returned Non-Zero Exit Status 1
2
gravatar for Niek De Klein
9.2 years ago by
Niek De Klein2.5k
Netherlands
Niek De Klein2.5k wrote:

I want to do a local BLAST using blastp from the Bio.Blast.Applications. However, when I run it I get a runtime error: returned non-zero exit status 1. According to the manual it is
Exit Code Meaning: 1 Error in query sequence(s) or BLAST options. The query used is fasta format protein sequences.

The command line I used, with the BLAST options, was:
'>>> print blastpcline
C:\Program Files\NCBI\blast-2.2.24+\bin\blastp.exe -query "C:\Documents and Settings\newintern\Desktop\Microproteins
niek\arabidopsis-HD.fasta" -db C:\Documents and Settings\newintern\Desktop\Microproteins_niek\arabidopsis-smallproteins.fasta -out test.xml -evalue 0.001 -outfmt 5

Anyone know how to fix that error?

Thanks
Niek

edit:

RuntimeError: Command C:\Niek\blast-2.2.17\bin\blastall.exe -query C:\Niek
\Test\arabidopsis-HD.fasta -db C:\Niek\Test\arabidopsis-smallproteins.fasta -out 
test.xml -evalue 0.001 -outfmt 5 returned non-zero exit status 1

I changed it to a path without spaces, still gives me the same error.

python biopython blast error • 6.7k views
ADD COMMENTlink modified 8.8 years ago by Peter5.8k • written 9.2 years ago by Niek De Klein2.5k
1

In your edit, you are calling the older blastall executable, but your query parameters look to be for blast+ blastp. To debug further, you should try running the command line from a prompt to see the error messages.

ADD REPLYlink written 9.2 years ago by Brad Chapman9.5k

have you tried the same query from command line?

ADD REPLYlink written 9.2 years ago by Istvan Albert ♦♦ 81k

You were right, after I changed the path I accidentally changed the blast path to the wrong blast. It's working now thanks!

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k
5
gravatar for Peter
9.2 years ago by
Peter5.8k
Scotland, UK
Peter5.8k wrote:

Like Paulo, I would also have suggested trying this with paths without spaces. It can be made to work but can be complicated - mainly with the db parameter where spaces are also used to separate multiple database names.

I don't have access to a Windows machine today, but I would first try this as the command (both at the command line, and via Python):

"C:\Program Files\NCBIblast-2.2.24+\bin\blastp.exe" -query "C:\Documents and Settings\newintern\Desktop\Microproteins_niekarabidopsis-HD.fasta" -db "C:\Documents and Settings\newintern\Desktop\Microproteins_niekarabidopsis-smallproteins.fasta" -out test.xml -evalue 0.001 -outfmt 5

i.e quotes round the executable name and database name as well as the query name.

A more complete example of the Python code would help, including version numbers.

ADD COMMENTlink modified 10 weeks ago by RamRS24k • written 9.2 years ago by Peter5.8k

Seems likely to me too, that this is the actually the problem.

ADD REPLYlink written 9.2 years ago by Michael Dondrup46k

I changed it to a path without spaces (forgot to edit it in my first post), but it still gives me the same error

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k
2
gravatar for Paulo Nuin
9.2 years ago by
Paulo Nuin3.7k
Canada
Paulo Nuin3.7k wrote:

I guess the error might be in the spaces you have in your file locations. It would depend on which version of Windows you are using (I guess XP), but there are many problems in parsing spaces on Windows, especially XP. Try moving your files to a location without spaces in the directory names.

ADD COMMENTlink written 9.2 years ago by Paulo Nuin3.7k

I've done that now, but it still gives the same error.

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k
2
gravatar for Daniel Swan
9.2 years ago by
Daniel Swan13k
Aberdeen, UK
Daniel Swan13k wrote:

Still haven't switched to blast+ but shouldn't you still run against a database that has been formatted with formatdb or similar rather than blasting against another fasta file? (unless of course your blast database is really called arabidopsis-HD.fasta, which I personally wouldn't do to avoid the obvious confusion)

edit: looks like formatdb is called makeblastdb in blast+

ADD COMMENTlink modified 9.2 years ago • written 9.2 years ago by Daniel Swan13k
2

If you don't name the db explicitly in either version, it will be called the fasta file name. Sometimes I do this for convenience.

ADD REPLYlink written 9.2 years ago by Paulo Nuin3.7k
1

The database is called arabidopsis-HD.fasta. And if somethings wrong with the db it gives a 'returned non-zero exit status 2' error.

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k
1

@Niek : At first view I would respond the same as Daniel. So did you format the file named arabidopsis-smallproteins.fasta using formatdb. Because according to your command line option -db it seems that this is your database.

ADD REPLYlink written 9.2 years ago by Fred Fleche4.3k
1

I just did the formatdb again and I'm sure that the database is correct, it's working fine when I'm using the command prompt directly, and with the blastall from blast-2.2.17 it's also working. I use the same db and query there.

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k

It's called arabidopsis-HD.fasta. And if somethings wrong with the db it gives a 'returned non-zero exit status 2' error.

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k

I just did the formatdb again and I'm sure that the database is correct, it's working fine when I'm using the command prompt directly.

ADD REPLYlink written 9.2 years ago by Niek De Klein2.5k
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: 1313 users visited in the last hour