[BioPython] downloading Genbank files from NCBI

Jeffrey Chang jchang at jeffchang.com
Wed Apr 30 01:46:39 EDT 2003


Are you retrieving gene or protein sequences?  The default values for 
NCBIDictionary gets gene sequences.  To get proteins, you have to set 
different parameters:
http://www.biopython.org/pipermail/biopython/2003-February/001216.html

Does it fail on all sequences, or just certain ones?

If that doesn't work, perhaps NCBI has changed something in their CGI 
script.

Jeff


On Tuesday, April 29, 2003, at 06:28  PM, Ashleigh Smythe wrote:

> 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
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython



More information about the BioPython mailing list