Error while running BLAST search with python
0
0
Entering edit mode
6.3 years ago

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?

Biopython python BLAST • 2.9k views
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Please don’t post code screen shots, use the code formatting button and paste the code in as plain text.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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