[BioPython] downloading Genbank files from NCBI

Ashleigh Smythe absmythe at ucdavis.edu
Tue Apr 29 19:28:48 EDT 2003


Hello.  I've been learning to use python and biopython for a few 
months now but am also new to programming/Linux in general so please 
forgive me for being slow!

I want to use biopython to download files of certain taxa and certain 
genes from Genbank.  I've been following the tutorial on the 
biopython website. I can use the search_for attribute from the 
GenBank module to get identifiers for sequence records but when I try 
to use GenBank.NCBIDictionary() to actually get the records it chugs 
along fine until it finds the record and then I get an error that 
says:

File ".../GenBank/__init__.py", line 1560, in __getitem__ raise 
KeyError, "I unexpectedly got back html-formatted data."

I don't know to fix the NCBIDictionary code to fix this.  I have been 
trying various other ways in general to extract the records I want 
from Genbank, such as parsing the big flat files but I haven't yet 
figured out how to extract the records I want.

Any suggestions as to how to fix the NCBIDictionary problem or how to 
do what I want to do in some other way would be greatly appreciated.

Thanks!
Ashleigh
***************************
Ashleigh B. Smythe
Graduate Research Assistant
Department of Nematology
UC Davis
One Shield's Ave.
Davis, CA 95616
(530)754-4321
absmythe at ucdavis.edu


More information about the BioPython mailing list