Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Static Public Attributes
Bio.ExPASy.ScanProsite.ContentHandler Class Reference

List of all members.

Public Member Functions

def __init__
def startElement
def endElement
def characters

Public Attributes

 element
 content
 record

Static Public Attributes

tuple integers = ("start", "stop")
tuple strings

Detailed Description

Definition at line 78 of file ScanProsite.py.


Constructor & Destructor Documentation

Definition at line 86 of file ScanProsite.py.

00086 
00087     def __init__(self):
        self.element = []

Here is the caller graph for this function:


Member Function Documentation

def Bio.ExPASy.ScanProsite.ContentHandler.characters (   self,
  content 
)

Definition at line 110 of file ScanProsite.py.

00110 
00111     def characters(self, content):
00112         self.content += content

Definition at line 98 of file ScanProsite.py.

00098 
00099     def endElement(self, name):
00100         assert name==self.element.pop()
00101         name = str(name)
00102         if self.element==["matchset", "match"]:
00103             match = self.record[-1]
00104             if name in ContentHandler.integers:
00105                 match[name] = int(self.content)
00106             elif name in ContentHandler.strings:
00107                 match[name] = self.content
00108             else:
00109                 # Unknown type, treat it as a string
                match[name] = self.content
def Bio.ExPASy.ScanProsite.ContentHandler.startElement (   self,
  name,
  attrs 
)

Definition at line 88 of file ScanProsite.py.

00088 
00089     def startElement(self, name, attrs):
00090         self.element.append(name)
00091         self.content = ""
00092         if self.element==["matchset"]:
00093             self.record = Record()
00094             self.record.n_match = int(attrs["n_match"])
00095             self.record.n_seq = int(attrs["n_seq"])
00096         elif self.element==["matchset", "match"]:
00097             match = {}
            self.record.append(match)

Member Data Documentation

Definition at line 90 of file ScanProsite.py.

Definition at line 87 of file ScanProsite.py.

tuple Bio.ExPASy.ScanProsite.ContentHandler.integers = ("start", "stop") [static]

Definition at line 79 of file ScanProsite.py.

Definition at line 92 of file ScanProsite.py.

Initial value:
("sequence_ac", 
               "sequence_id",
               "sequence_db",
               "signature_ac",
               "level",
               "level_tag")

Definition at line 80 of file ScanProsite.py.


The documentation for this class was generated from the following file: