[Biopython] getting multiple BLAST (NCBIWWW) queries to work

James Wagner jamesrwagner at gmail.com
Tue Mar 29 17:55:56 UTC 2011


Hello:

I was trying just as a proof of concept to do an NCBI WWW BLAST query
with a FASTA file containing more than one sequence (but still a small
number of sequences).

I tried with the opuntia.fasta file from the website, and set it up as follows:

result_handle = NCBIWWW.qblast("blastn", "nr", open("opuntia.fasta","r"))
blast_records = NCBIXML.parse(result_handle)

then I try:

for record in blast_records:
      print record.alignments

and I obtain:
[]


Surely at the very least since there were 7 sequences in this file, I
should get 7 empty lists, assuming of course none of the sequences
gives a hit in nr, which I am sure is not the case either?

What is still missing? I realize I could use SeqIO.parse to obtain
each sequence from the FASTA file and do a separate qblast, but surely
doing this separately for each protein would create unnecessary
overhead with the network traffic compared to somehow sending off all
the protein queries at once?



More information about the Biopython mailing list