[Biopython] How to restrict blast query to proteins of a certain species
Peter
biopython at maubp.freeserve.co.uk
Fri Aug 28 15:29:15 UTC 2009
On Fri, Aug 28, 2009 at 4:19 PM, Kelly F Oakeson<kelly.oakeson at utah.edu> wrote:
> Hell list,
> I would like to do something similar, but I would like to limit my
> blast search to just the microbial Taxonomic ID.
Then just change the Entrez query, e.g. Taxon ID 2 for eubacteria:
from Bio.Blast import NCBIWWW
fasta_string = """>Test
ATGGCCAATACTCCTTCGGCCAAGAAGGCAGTGCGCAAGATCGCTGCCCGCACCGAGATCAACAAGTCCC
GCCGTTCGCGCGTGCGCACTTTCGTGCGCAAGCTGGAAGACGCTCTGCTGAGCGGCGACAAGCAGGCAGC
GGAAGTTGCGTTCAAGGCTGTTGAGCCTGAACTGATGCGCGCCGCCTCCAAGGGCGTGGTGCACAAGAAC
ACCGCGGCCCGCAAGGTTTCGCGTCTTGCCAAGCGCGTGAAGGCTCTGAACGCCTGA
"""
result_handle = NCBIWWW.qblast("blastn", "nr",
entrez_query="txid2[orgn]", fasta_string)
Peter
More information about the Biopython
mailing list