Table of Contents

Module: Prodoc Bio/Prosite/Prodoc.py

Prodoc.py

This module provides code to work with the prosite.doc file from Prosite. http://www.expasy.ch/prosite/

Tested with: Release 15.0, July 1998 Release 16.0, July 1999

Classes: Record Holds Prodoc data. Reference Holds data from a Prodoc reference. Iterator Iterates over entries in a Prodoc file. Dictionary Accesses a Prodoc file using a dictionary interface. ExPASyDictionary Accesses Prodoc records from ExPASy. RecordParser Parses a Prodoc record into a Record object.

_Scanner Scans Prodoc-formatted data. _RecordConsumer Consumes Prodoc data to a Record object.

Functions: index_file Index a Prodoc file for a Dictionary. _extract_record Extract Prodoc data from a web page.

Imported modules   
from Bio import File, Index
from Bio.ParserSupport import *
from Bio.WWW import ExPASy
import re
import sgmllib
import string
import time
from types import *
Functions   
_extract_record
index_file
  _extract_record 
_extract_record ( handle )

_extract_record(handle) -> str

Extract PRODOC data from a web page. Raises a ValueError if no data was found in the web page.

Exceptions   
ValueError, "No data found in web page."
  index_file 
index_file (
        filename,
        indexname,
        rec2key=None,
        )

index_file(filename, indexname, rec2key=None)

Index a Prodoc file. filename is the name of the file. indexname is the name of the dictionary. rec2key is an optional callback that takes a Record and generates a unique key (e.g. the accession number) for the record. If not specified, the id name will be used.

Exceptions   
KeyError, "duplicate key %s found" % key
KeyError, "empty key was produced"
ValueError, "%s does not exist" % filename
Classes   
Dictionary

Accesses a Prodoc file using a dictionary interface.

ExPASyDictionary

Access PRODOC at ExPASy using a read-only dictionary interface.

Iterator

Returns one record at a time from a Prodoc file.

Record

Holds information from a Prodoc record.

RecordParser

Parses Prodoc data into a Record object.

Reference

Holds information from a Prodoc citation.

_RecordConsumer

Consumer that converts a Prodoc record to a Record object.

_Scanner

Scans Prodoc-formatted data.


Table of Contents

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