Entering edit mode
6.3 years ago
cindyfang70
•
0
I am very new to both bioinformatics and coding in general, so I'm sorry if this is a dumb question! I have a project where I have to run BLAST searches with Python. I used the following syntax:
from Bio.Blast import NCBIWWW
fasta_string = open("seqdump.txt").read()
result_handle = NCBIWWW.qblast("tblastn","nt",fasta_string)
The seqdump.txt file is a FASTA file that I downloaded from NCBI in order to test my program. However, once I run it in command line, I am receiving a very long error, the last line of which is: urllib.error.URLError: < urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) > What does this error mean and how do I fix it?
Did you look at https://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc96 ?
Do you have to run searches against NCBI online databases or you could run local BLAST?
Yes, I checked my code against the example given there and it is essentially the same. I would prefer to run searches against the online databases for now, as I currently do not have enough storage to download databases. The problem is that I'm not even sure what the error means, so I have no clue how to fix it.
Could you provide more information e.g. OS, python version, biopython version and sample input. It would be useful if you could post the exact error that you are getting as it would help to figure out the issue.
Here is a screenshot of the error: https://ibb.co/kbRyiz I am using macOS High Sierra (Version 10.13.4), Python 3.6, and Biopython 1.72. The input was just a mRNA sequence downloaded from NCBI.
Please don’t post code screen shots, use the code formatting button and paste the code in as plain text.
It is possible that SSL certificates are missing from your python install. Is this on macOS? Take a look at Craig Glennie's answer in this SO thread.