Bio.ExPASy.ScanProsite module

Code for calling and parsing ScanProsite from ExPASy.

class Bio.ExPASy.ScanProsite.Record

Bases: list

Represents search results returned by ScanProsite.

This record is a list containing the search results returned by ScanProsite. The record also contains the data members n_match, n_seq, capped, and warning.


Initialize the class.

Bio.ExPASy.ScanProsite.scan(seq='', mirror='', output='xml', **keywords)

Execute a ScanProsite search.

  • mirror: The ScanProsite mirror to be used


  • seq: The query sequence, or UniProtKB (Swiss-Prot,

    TrEMBL) accession

  • output: Format of the search results

    (default: xml)

Further search parameters can be passed as keywords; see the documentation for programmatic access to ScanProsite at for a description of such parameters.

This function returns a handle to the search results returned by ScanProsite. Search results in the XML format can be parsed into a Python object, by using the function.

Parse search results returned by ScanProsite into a Python object.

class Bio.ExPASy.ScanProsite.Parser

Bases: xml.sax.expatreader.ExpatParser

Process the result from a ScanProsite search (PRIVATE).


Initialize the class.

feed(self, data, isFinal=0)

Raise an Error if plain text is received in the data.

This is to show the Error messages returned by ScanProsite.

class Bio.ExPASy.ScanProsite.ContentHandler

Bases: xml.sax.handler.ContentHandler

Process and fill in the records, results of the search (PRIVATE).

integers = ('start', 'stop')
strings = ('sequence_ac', 'sequence_id', 'sequence_db', 'signature_ac', 'level', 'level_tag')

Initialize the class.

startElement(self, name, attrs)

Define the beginning of a record and stores the search record.

endElement(self, name)

Define the end of the search record.

characters(self, content)

Store the record content.