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.

__init__()

Initialize the class.

Bio.ExPASy.ScanProsite.scan(seq='', mirror='https://prosite.expasy.org', output='xml', **keywords)

Execute a ScanProsite search.

Arguments:
  • mirror: The ScanProsite mirror to be used

    (default: https://prosite.expasy.org).

  • 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 https://prosite.expasy.org/scanprosite/scanprosite_doc.html 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 Bio.ExPASy.ScanProsite.read function.

Bio.ExPASy.ScanProsite.read(handle)

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).

__init__()

Initialize the class.

feed(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')
__init__()

Initialize the class.

startElement(name, attrs)

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

endElement(name)

Define the end of the search record.

characters(content)

Store the record content.