Seems likely to me too, that this is the actually the problem.
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\Microproteinsniek\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.
3 answers
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.
I changed it to a path without spaces (forgot to edit it in my first post), but it still gives me the same error
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.
I've done that now, but it still gives the same error.
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+
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.
It's called arabidopsis-HD.fasta. And if somethings wrong with the db it gives a 'returned non-zero exit status 2' error.
The database is called arabidopsis-HD.fasta. And if somethings wrong with the db it gives a 'returned non-zero exit status 2' error.
@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.
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.
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.
Log in to answer this question.
have you tried the same query from command line?
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.
You were right, after I changed the path I accidentally changed the blast path to the wrong blast. It's working now thanks!