Error when using blastn in biopython
0
0
Entering edit mode
14 months ago
Hood • 0

I am trying to use NcbiblastnCommandline from biopython and catching an error:

Bio.Application.ApplicationError: Non-zero return code 1 from 'blastn -out output.csv -outfmt 6 qstart qend length sstrand -query original.fasta -evalue 1000 -word_size 4 -subject original.fasta -strand plus -dust no -perc_identity 100.0', message 'USAGE'

There is no error when I execute the same command from terminal, google search give me nothing about this error and message "USAGE" absolutely non-informative for me. What can cause such error and how can I fix it?

biopython blastn • 499 views
ADD COMMENT
0
Entering edit mode

I think 6 qstart qend length sstrand needs to be in quotation marks.

ADD REPLY
0
Entering edit mode

In my script it is in quotation marks.

cline = NcbiblastnCommandline(query="original.fasta", subject="original.fasta", out="output.csv", outfmt="6 qstart qend length sstrand", dust="no", word_size=4, evalue=1000, strand="plus", perc_identity=100.0)
ADD REPLY
1
Entering edit mode

What does it appear like in cline? It needs to be in " options " in the actual command line.

ADD REPLY
0
Entering edit mode

Yes, you right. Thank you. The problem was in quotation marks, but now I am a little confused because yesterday I was writing another script and I was using the same way to customize my output table and all worked without quotation marks in command line. And it works now. In yesterday's script. I checked.

ADD REPLY
0
Entering edit mode

Was that a blast command script? In this case blast needs that option to be in quotes.

ADD REPLY
0
Entering edit mode

Now I understand, but in my yesterday's script outfmt="6 qseqid sseqid qcovs" works perfectly, whereas today outfmt="6 qstart qend length sstrand" is not working but outfmt="'6 qstart qend length sstrand'" is working.

ADD REPLY

Login before adding your answer.

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