Remote blast from biopython
0
1
Entering edit mode
7.4 years ago

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 • 2.1k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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