I can't make NcbiblastnCommandline work. Creates the outfile but it's empty.
1
1
Entering edit mode
8.0 years ago
madeltutor ▴ 10

def blast():

from Bio.Blast import NCBIXML
from Bio.Blast.Applications import NcbiblastnCommandline
cline = NcbiblastnCommandline(query="sequence.fasta", db="nt", outfmt=6, out="blast.tbl")
outfile = open("blast.tbl", "w")
outfile.write(cline.parse())
outfile.close()
cline.close()
blast biopython • 1.7k views
ADD COMMENT
1
Entering edit mode

Please read through this post: How to Use Biostars, Part-I: Questions, Answers, Comments and Replies

You will have to rewrite your question to get a relevant response from the community. When people see that the post text is just code, they will skip it.

ADD REPLY
0
Entering edit mode
8.0 years ago
Markus ▴ 320

After defining your command line, you should just "run" it:

cline = NcbiblastnCommandline(query="sequence.fasta", db="nt", outfmt=6, out="blast.tbl")
cline()

This will generate your file blast.tbl

ADD COMMENT

Login before adding your answer.

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