[Biopython] Fwd: Qblast : no hits
Peter
biopython at maubp.freeserve.co.uk
Fri Apr 30 11:15:05 UTC 2010
On Fri, Apr 30, 2010 at 11:50 AM, Karthik Raja <cloudycrimson at gmail.com> wrote:
> hello Peter,
>
> I have done blast for 25 sequences and have got 10 hits for each sequence. I
> have stored the results in an XML file. Now i need to *parse* it and the
> information in the cookbook isn helping me.
>
>>>> from Bio.Blast import NCBIWWW
>>>> result_handle = open("finaltest3.xml")
>>>> from Bio.Blast import NCBIXML
>>>> blast_records = NCBIXML.parse(result_handle)
>>>> for blast_record in blast_records:
>
> I am using the above code. Please tell me how to proceed to get information
> namely "sequence, seq id, e value and alignment".
That should be fairly clear from the tutorial, look at the section titled
"The BLAST record class".
> And I also have another doubt. While using q blast, is it possible to
> restrict the results to only human and mouse hits? If yes, it will be great
> if you could give me an example code or link.
You can ask the NCBI to filter the BLAST results for you with an
Entrez query, one of the optional arguments to the Biopython
qblast function. Something like "mouse[ORGN] OR human[ORGN]"
should work. You can try out the Entrez query on the website to
make sure you have the right syntax and terms.
Peter
More information about the Biopython
mailing list