This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Remote blast from biopython

I'm having a problem with blast from Biopython. I am trying to use the NCBIWWW modules qblast to blast a protein sequence, but it returns no results. If I put the same sequence into the web form and run against the same database, I get lots of hits.

E.g:

$cat test.fasta 
>CR_00320C_A|NAP1 COORDS:Ca22chrRA_C_albicans_SC5314:83460-82153C, translated using codon table 12 (435 amino acids)
MTEQPINTKKKNGDISKAPTPQNTPASVTNSYMRSKPPTVSTIQESNNEDGTGAAAAAGG
LANNPVLLSMIQGKLGDLVGKQSGYIDNLSKPVKNRVYGLKSLQLNQMKLEAQFQKELLE
LEKKFFAKYQPLYVKRKQIINGELEPTVEEIEEGQQLEEEEKGIDKEDGEEEEEEEEDDE
EEDEQGIPGFWLTALENLSTVSETITDRDSEVLSNLIDIRMEYLSTPGFQLIFEFKPNDF
FENQTLTKTYHYQAELGYSGDFVYDHADGCEIRWKSKENNVTITIERRKQRNKTTKQTRT
IEKLTPTESFFNFFDPPKPPKIKSEDDDNDDKLQDKEEANDDDEGEEGDEEDEELEARLE
LDYQLGEEIKDRLIPRAIDWFTGDAVDFDYPELEGEGDEDEYSDEDGEGDSDDDDDDDDE
AAGSQKQPPPECKQQ*  

$ipython
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:42:40) 
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from Bio.Blast.NCBIWWW import qblast

In [2]: r = qblast("blastp","landmark", open("test.fasta").read())

In [3]: from Bio.Blast import NCBIXML

In [4]: r2 = NCBIXML.read(r)

In [5]: r2.alignments
Out[5]: []
biopython blast

I tried to reproduce this on Windows using v4.1.2 of Anaconda. I get an HTTP Error 403: Forbidden error on the r = qblast(...) assignment step.

Sorry I couldn't be of more help.

Sounds like you are using a version of biopython from before NCBI switched to https only.

0 answers

No answers yet.

Log in to answer this question.