Table of Contents

Class: NCBIDictionary Bio/GenBank/__init__.py

Access GenBank using a read-only dictionary interface.

Methods:

Methods   
__getitem__
__init__
__len__
__setitem__
clear
copy
get
has_key
items
keys
update
values
  __getitem__ 
__getitem__ ( self,  id )

  1. __getitem__(id) -> object

    Return the GenBank entry. id is the GenBank ID (gi) of the entry. Raises a KeyError if there's an error.

Exceptions   
KeyError, "Empty information returned."
KeyError, "I unexpectedly got back html-formatted data."
KeyError, line
KeyError, x
  __init__ 
__init__ (
        self,
        database='Nucleotide',
        delay=5.0,
        parser=None,
        )

NCBIDictionary([database][, delay][, parser])

Create a new Dictionary to access GenBank. database should be either Nucleotide or Protein. delay is the number of seconds to wait between each query (5 default). parser is an optional parser object to change the results into another form. If unspecified, then the raw contents of the file will be returned.

Exceptions   
ValueError, "database should be 'Nucleotide' or 'Protein'."
  __len__ 
__len__ ( self )

Exceptions   
NotImplementedError, "GenBank contains lots of entries"
  __setitem__ 
__setitem__ (
        self,
        key,
        item,
        )

Exceptions   
NotImplementedError, "This is a read-only dictionary"
  clear 
clear ( self )

Exceptions   
NotImplementedError, "This is a read-only dictionary"
  copy 
copy ( self )

Exceptions   
NotImplementedError, "You don't need to do this..."
  get 
get (
        self,
        id,
        failobj=None,
        )

Exceptions   
"How did I get here?"
  has_key 
has_key ( self,  id )

  1. has_key(id) -> bool

  items 
items ( self )

Exceptions   
NotImplementedError, "You don't really want to do this..."
  keys 
keys ( self )

Exceptions   
NotImplementedError, "You don't really want to do this..."
  update 
update ( self )

Exceptions   
NotImplementedError, "This is a read-only dictionary"
  values 
values ( self )

Exceptions   
NotImplementedError, "You don't really want to do this..."

Table of Contents

This document was automatically generated on Mon Jul 1 12:02:49 2002 by HappyDoc version 2.0.1