Remote BLAST at NCBI

Using NCBI remote BLAST against a specific species requires a different setup than you may be used to from local BLAST or the NCBI web page. Unlike local BLAST or the NCBI web-based BLAST, you can't specify a species-specific database to BLAST against. Instead you must choose a general database like nr or refseq_genomic and narrow the search using an NCBI eQuery string. The BioPython qblast command makes eQuery available as a keyword argument.

 

BioPython

This code will perform a remote BLASTn against the RefSeq genome database, limited to human results without "clone" in the description.

from Bio.Blast import NCBIWWW
blast_handle = NCBIWWW.qblast("blastn", "refseq_genomic", input_sequence, entrez_query="homo sapiens[orgn] NOT clone[all]")