I can't make NcbiblastnCommandline work. Creates the outfile but it's empty.
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()
• 2,080 views
•
link
1 answer
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
• 0 views
•
link
Log in to answer this question.
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.