[Biopython-dev] A little BLAST testing please?

Iddo Friedberg idoerg at burnham.org
Wed Feb 16 19:11:53 EST 2005


Here is the code bit which used to break because of BlastParser. I think 
it is fixed, but since we want to get a release out in two days time, I 
just want people to have a quick run looksee:

-------- begin testwwwblast.py --------------------
import sys
from Bio.Blast import NCBIWWW
from Bio import Fasta

print sys.argv[1]
file_for_blast = open(sys.argv[1], 'r')
f_iterator = Fasta.Iterator(file_for_blast)
f_record = f_iterator.next()

b_results = NCBIWWW.qblast('blastp', 'nr', f_record).read()

b_record = NCBIWWW.BlastParser().parse_str(b_results)

----------- end -----------------------

Just run this using:

% python testwwwblast.py your_favorite_fasta_file

(Make sure that you change 'blastp' to 'blastn' or 'tblastx' or somesuch 
if you are running a nucleotide file).

If you don't get a horrible Exception, then things are OK.

If you get a horrible exception, let me know.

Best,

Iddo

-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP




More information about the Biopython-dev mailing list