[Biopython] NCBI Blast, what an I going wrong

Vincent Davis vincent at vincentdavis.net
Sun Feb 10 20:16:20 UTC 2013


I am having trouble with NCBIWWW.qblast  I can get the the example to work.
Maybe I need help with reading :-)

>From the documentation
result_handle = NCBIWWW.qblast("blastn", "nt", "8332116")
save_file = open("temp.xml", "w")
save_file.write(result_handle.read())
save_file.close()
result_handle.close()
result_handle = open("temp.xml")
blast_record = NCBIXML.parse(result_handle)

The temp.xml looks correct but I can get nothing from blast_record. I have
tried passing the directly to NCBIXML.parse and still no luck.

How would I for example get the first hit "gi|224094601" ?

Vincent Davis



More information about the Biopython mailing list