Package Bio :: Package Prosite
[hide private]
[frames] | no frames]

Package Prosite

source code

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

Tested with: Release 15.0, July 1998 Release 16.0, July 1999 Release 17.0, Dec 2001 Release 19.0, Mar 2006

Functions: parse Iterates over entries in a Prosite file. scan_sequence_expasy Scan a sequence for occurrences of Prosite patterns. index_file Index a Prosite file for a Dictionary. _extract_record Extract Prosite data from a web page. _extract_pattern_hits Extract Prosite patterns from a web page.

Classes: Record Holds Prosite data. PatternHit Holds data from a hit against a Prosite pattern. Dictionary Accesses a Prosite file using a dictionary interface. RecordParser Parses a Prosite record into a Record object. Iterator Iterates over entries in a Prosite file; DEPRECATED.

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

Submodules [hide private]

Classes [hide private]
  Record
Holds information from a Prosite record.
  PatternHit
Holds information from a hit against a Prosite pattern.
  Iterator
Returns one record at a time from a Prosite file.
  Dictionary
Accesses a Prosite file using a dictionary interface.
  ExPASyDictionary
Access PROSITE at ExPASy using a read-only dictionary interface.
  RecordParser
Parses Prosite data into a Record object.
  _Scanner
Scans Prosite-formatted data.
  _RecordConsumer
Consumer that converts a Prosite record to a Record object.
Functions [hide private]
 
parse(handle) source code
 
read(handle) source code
list of PatternHit's
scan_sequence_expasy(seq=None, id=None, exclude_frequent=None)
Search a sequence for occurrences of Prosite patterns.
source code
list of PatternHit's
_extract_pattern_hits(handle)
Extract hits from a web page.
source code
 
index_file(filename, indexname, rec2key=None)
Index a Prosite file.
source code
str
_extract_record(handle)
Extract PROSITE data from a web page.
source code
Variables [hide private]
  __package__ = 'Bio.Prosite'
  xml_support = 1
Function Details [hide private]

scan_sequence_expasy(seq=None, id=None, exclude_frequent=None)

source code 

Search a sequence for occurrences of Prosite patterns. You can specify either a sequence in seq or a SwissProt/trEMBL ID or accession in id. Only one of those should be given. If exclude_frequent is true, then the patterns with the high probability of occurring will be excluded.

Returns: list of PatternHit's

_extract_pattern_hits(handle)

source code 

Extract hits from a web page. Raises a ValueError if there was an error in the query.

Returns: list of PatternHit's

index_file(filename, indexname, rec2key=None)

source code 

Index a Prosite 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.

_extract_record(handle)

source code 

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

Returns: str