[Biopython] Qblast : no hits

Peter biopython at maubp.freeserve.co.uk
Fri Apr 23 09:49:55 UTC 2010


Hello Karthik

On Fri, Apr 23, 2010 at 8:56 AM, Karthik Raja <cloudycrimson at gmail.com> wrote:
> Hello freinds,
>
> I have a  problem with qblast. I have sequences from the mass
> spectromerty equipment that needs to be BLASTed to find the protein it
> belongs to. When I blast these sequences in the NCBI website it takes
> some time (longer than usual ) but does gives me hits. When i blast
> them using the following code in biopython they dont give me any hits.
>
> CODE:
>
> ****************************************************************************
>
>>>> from Bio.Blast import NCBIWWW
>>>> result_handle = NCBIWWW.qblast("blastp", "nr", "AFAQVRCSGLARGGGYVLR")
>>>> blast_results = result_handle.read()
>>>> save_file = open( "testseq.xml", "w")
>>>> save_file.write(blast_results)
>>>> save_file.close()
>
> ****************************************************************************
>
> Is this because a normal blast code doesn wait long till the results are
> given? I mean the RTOE error. if yes, how to control the "time of
> execution"?

What error? It looks like your example ran fine.

> Or else what is the problem with my code?
>
> If you guys know anything on this issue, please give me your ideas.

Differences between a manual BLAST search on the NCBI website
and a script search via QBLAST are almost always down to different
parameter settings. The NCBI have often adjusted the defaults on
the website, and they no longer match the defaults on QBLAST.
You should check things like the expectation cut off, the matrix,
gap penalties etc. The simplest option would be just to copy the
current defaults from the website into your python code.

We probably need to put this into the Biopython FAQ ...

Regards,

Peter




More information about the Biopython mailing list