[BioPython] NCBIDictionary and genome database

Michiel Jan Laurens de Hoon mdehoon at c2b2.columbia.edu
Thu Jan 25 20:27:20 UTC 2007


Hi Tiago,

Which genbank record are you trying to download?
Just so I can replicate the problem and try your workaround.

--Michiel

Tiago Antão wrote:
> Hi!
> 
> Just a question regarding accessing NCBI genome database from NCBIDictionary:
> In the code there is:
> class NCBIDictionary:
>     """Access GenBank using a read-only dictionary interface.
>     """
>     VALID_DATABASES = ['nucleotide', 'protein']
> That is, genome is not a valid one.
> Is there a reason for that?
> 
> BTW, I have the following workaround (which might be good or bad...):
> 
> from Bio import GenBank
> from Bio.config.DBRegistry import EUtilsDB, DBGroup
> from Bio.dbdefs.genbank import ncbi_failures
> from Bio import db
> 
> genome_genbank_eutils = EUtilsDB(
>         name = "genome-genbank-eutils",
>         doc = "Retrieve genome GenBank sequences from NCBI using EUtils",
>         delay = 5.0,
>         db = "genome",
>         rettype = "gb",
>         failure_cases = ncbi_failures
>         )
> 
> 
> ncbi_dict = GenBank.NCBIDictionary('nucleotide', 'genbank')
> ncbi_dict.db = genome_genbank_eutils
> 
> Regards,
> Tiago


-- 
Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1130 St Nicholas Avenue
New York, NY 10032



More information about the Biopython mailing list