Package Bio :: Package SwissProt :: Module SProt
[hide private]
[frames] | no frames]

Module SProt

source code

This module provides code to work with the sprotXX.dat file from SwissProt. http://www.expasy.ch/sprot/sprot-top.html

Tested with: Release 37, Release 38, Release 39

Limited testing with: Release 51, 54

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

_Scanner Scans SwissProt-formatted data. _RecordConsumer Consumes SwissProt data to a Record object. _SequenceConsumer Consumes SwissProt data to a Seq object.

Functions: index_file Index a SwissProt file for a Dictionary.

Classes [hide private]
  Record
Holds information from a SwissProt record.
  Reference
Holds information from 1 references in a SwissProt entry.
  Iterator
Returns one record at a time from a SwissProt file.
  Dictionary
Accesses a SwissProt file using a dictionary interface.
  ExPASyDictionary
Access SwissProt at ExPASy using a read-only dictionary interface.
  RecordParser
Parses SwissProt data into a Record object.
  SequenceParser
Parses SwissProt data into a standard SeqRecord object.
  _Scanner
Scans SwissProt-formatted data.
  _RecordConsumer
Consumer that converts a SwissProt record to a Record object.
  _SequenceConsumer
Consumer that converts a SwissProt record to a SeqRecord object.
Functions [hide private]
 
index_file(filename, indexname, rec2key=None)
Index a SwissProt file.
source code
Variables [hide private]
  _CHOMP = ' \n\r\t.,;'
  xml_support = 1
Function Details [hide private]

index_file(filename, indexname, rec2key=None)

source code 

Index a SwissProt 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 entry name will be used.