I have been using Biopython to make scripts to run sequences through BLAST. I'm using the command:
NCBIWWW.qblast()
Here is the beginning of most of my scripts:
import sys, os
from Bio import SeqIO, Entrez, SearchIO
from Bio.Blast import NCBIWWW, NCBIXML
from ftplib import FTP
from urllib.error import HTTPError
fasta_string = open(sys.argv[1]).read()
result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string, hitlist_size=10)
save_file = open("my_blast.xml", "w")
save_file.write(result_handle.read())
save_file.close()
result_handle.close()
I couple months ago I had no problem running these scripts, now none of them will run but I will receive no error from the script. It will just look like its running but get suck at the above BLAST command. Is anyone else having a similar issue? If so were you able to fix it?? Thanks so much for the help!!
Can you post more snippets of your script?
Edited the original question!
You get something in your terminal if you add
?
I added this to my code and only got this in terminal:
Where did you add the line, it has to be before the
result_handle.close()
call is made.Consider reinstalling or updating BioPython? I can't tell you why its suddently stopped working for you, because that code works for me. (Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34), BioPython v1.70)
Has anything about your network (or your local infrastructure) changed? Seems like it could be a network issue.
I recall moving from http to https somewhere in the past although I think more than a few months ago. Maybe an update will help