How To Show More Blast Results Using Biopython?
3
1
Entering edit mode
14.2 years ago
Niek De Klein ★ 2.6k

Hi,

I'm using biopython to BLAST over the internet. However, it only saves 30 results (there are more than 30 results that are under the e-value I chose) in the xml. I've been looking all over but can't find how to make that number higher. So my question is, how can you show more results from BLAST using biopython. I'm using NCBIWWW.qblast from BIO.BLAST.

from Bio.Blast import  NCBIWWW
File = "MIF"
fasta_string = open(File+".fasta").read()
result_handle = NCBIWWW.qblast("blastp", "nr", fasta_string)

Thanks, Niek

biopython blast python • 6.1k views
ADD COMMENT
0
Entering edit mode

Which blast service are you using?

ADD REPLY
0
Entering edit mode

NCBIWWW.qblast

File = "MIF"
fasta_string = open(File+".fasta").read()
result_handle = NCBIWWW.qblast("blastp", "nr", fasta_string)
ADD REPLY
0
Entering edit mode

I editted it in my post.

ADD REPLY
3
Entering edit mode
14.2 years ago
Science_Robot ★ 1.1k

From here:

qblast(program, database, sequence, 
       ncbi_gi=None, descriptions=None,
       alignments=None, expect=None,
       matrix=None, filter=None,
       format_type=None, hitlist_size=None,
       entrez_query='(none)')

Did you try setting descriptions, alignments, and/or hitlist_size?

ADD COMMENT
0
Entering edit mode

Yes thank you! I've been looking for a site like that.

ADD REPLY
3
Entering edit mode
14.2 years ago
User 59 13k

According to this post here (a little outdated I admit), you will want to override the hitlist_size defaults.

ADD COMMENT
0
Entering edit mode
14.2 years ago
Peter 6.0k

Hello Niek,

Daniel pointed out an email to the Biopython mailing list which answers your question - basically try reading the built in documentation. This is also mentioned in the Biopython Tutorial, quote:

For more about the optional BLAST arguments, we refer you to the NCBI’s own documentation, or that built into Biopython:
from Bio.Blast import NCBIWWW
help(NCBIWWW.qblast)

Also audyyy pointed out some old (but apparently still relevant) documentation from Andrew Dalke's homepage.

You said

I've been looking all over but can't find how to make that number higher.

so you probably looked at some of these bits of documentation (right?). Could you suggest how it could be made clearer for newcomers? Feedback does help to improve the docs.

Thanks,
Peter

ADD COMMENT

Login before adding your answer.

Traffic: 1840 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6