[Biopython] Organism specific NCBIWWW qblast

Brad Chapman chapmanb at 50mail.com
Sun Jan 10 13:17:26 UTC 2010


Hi Brett;

> I'm trying to create a dataset of proteins that are both highly
> similar to, and from the same species as, my query sequence.  Since
> I'm going to be doing this repeatedly, for many different query
> sequences, I'm trying to automate the process with Biopython, but I
> can't figure out how to enable organism-specific blasts with qblast.
> Any guidance be greatly appreciated.

You want to use the entrez_query argument to qblast:

result_handle = NCBIWWW.qblast("blastn", "nr", record.format("fasta"), 
                 entrez_query="Mus musculus[orgn]")

See these previous threads for more discussion:

http://lists.open-bio.org/pipermail/biopython/2009-June/005215.html
http://www.biopython.org/pipermail/biopython/2009-September/005616.html

Once you've got a short example running it would be great if you
could add it as an example to the online cookbook:

http://biopython.org/wiki/Category:Cookbook

A nice discussion there could help others in the future with the
same issue.

Thanks,
Brad



More information about the Biopython mailing list