# Bio.ExPASy package

## Submodules

- Bio.ExPASy.Enzyme module
  - `parse()`
  - `read()`
  - `Record`
    - `Record.__init__()`
    - `Record.__repr__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
- Bio.ExPASy.Prodoc module
  - `read()`
  - `parse()`
  - `Record`
    - `Record.__init__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `Reference`
    - `Reference.__init__()`
    - `Reference.__annotate_func__`
    - `Reference.__annotations_cache__`
    - `Reference.__firstlineno__`
    - `Reference.__static_attributes__`
- Bio.ExPASy.Prosite module
  - `parse()`
  - `read()`
  - `Record`
    - `Record.__init__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
- Bio.ExPASy.ScanProsite module
  - `Record`
    - `Record.__init__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`
  - `scan()`
  - `read()`
  - `Parser`
    - `Parser.__init__()`
    - `Parser.feed()`
    - `Parser.__annotate_func__`
    - `Parser.__annotations_cache__`
    - `Parser.__firstlineno__`
    - `Parser.__static_attributes__`
  - `ContentHandler`
    - `ContentHandler.integers`
    - `ContentHandler.strings`
    - `ContentHandler.__init__()`
    - `ContentHandler.startElement()`
    - `ContentHandler.endElement()`
    - `ContentHandler.characters()`
    - `ContentHandler.__annotate_func__`
    - `ContentHandler.__annotations_cache__`
    - `ContentHandler.__firstlineno__`
    - `ContentHandler.__static_attributes__`
- Bio.ExPASy.cellosaurus module
  - Examples
  - `parse()`
  - `read()`
  - `Record`
    - `Record.__init__()`
    - `Record.__repr__()`
    - `Record.__str__()`
    - `Record.__annotate_func__`
    - `Record.__annotations_cache__`
    - `Record.__firstlineno__`
    - `Record.__static_attributes__`

## Module contents

Code to access resources at ExPASy over the WWW.

See https://www.expasy.org/

Functions:

  - get_prodoc_entry Interface to the get-prodoc-entry CGI script.

  - get_prosite_entry Interface to the get-prosite-entry CGI script.

  - get_prosite_raw Interface to the get-prosite-raw CGI script.

  - get_sprot_raw Interface to the get-sprot-raw CGI script.

Bio.ExPASy.get_prodoc_entry(id, cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prodoc-entry')

  Get a text handle to a PRODOC entry at ExPASy in HTML format.

      >>> from Bio import ExPASy
      >>> import os
      >>> with ExPASy.get_prodoc_entry('PDOC00001') as in_handle:
      ...     html = in_handle.read()
      ...
      >>> with open("myprodocrecord.html", "w") as out_handle:
      ...     length = out_handle.write(html)
      ...
      >>> os.remove("myprodocrecord.html")  # tidy up

  For a non-existing key XXX, ExPASy returns an HTML-formatted page containing this text: ‘There is currently no PROSITE entry for’

Bio.ExPASy.get_prosite_entry(id, cgi='https://prosite.expasy.org/cgi-bin/prosite/get-prosite-entry')

  Get a text handle to a PROSITE entry at ExPASy in HTML format.

      >>> from Bio import ExPASy
      >>> import os
      >>> with ExPASy.get_prosite_entry('PS00001') as in_handle:
      ...     html = in_handle.read()
      ...
      >>> with open("myprositerecord.html", "w") as out_handle:
      ...     length = out_handle.write(html)
      ...
      >>> os.remove("myprositerecord.html")  # tidy up

  For a non-existing key XXX, ExPASy returns an HTML-formatted page containing this text: ‘There is currently no PROSITE entry for’

Bio.ExPASy.get_prosite_raw(id, cgi=None)

  Get a text handle to a raw PROSITE or PRODOC record at ExPASy.

  The cgi argument is deprecated due to changes in the ExPASy website.

      >>> from Bio import ExPASy
      >>> from Bio.ExPASy import Prosite
      >>> with ExPASy.get_prosite_raw('PS00001') as handle:
      ...     record = Prosite.read(handle)
      ...
      >>> print(record.accession)
      PS00001

  This function raises a ValueError if the identifier does not exist:

      >>> handle = ExPASy.get_prosite_raw("DOES_NOT_EXIST")
      Traceback (most recent call last):
          ...
      ValueError: Failed to find entry 'DOES_NOT_EXIST' on ExPASy

Bio.ExPASy.get_sprot_raw(id)

  Get a text handle to a raw SwissProt entry at ExPASy.

  For an ID of XXX, fetches http://www.uniprot.org/uniprot/XXX.txt (as per the https://www.expasy.org/expasy_urls.html documentation).

      >>> from Bio import ExPASy
      >>> from Bio import SwissProt
      >>> with ExPASy.get_sprot_raw("O23729") as handle:
      ...     record = SwissProt.read(handle)
      ...
      >>> print(record.entry_name)
      CHS3_BROFI

  This function raises a ValueError if the identifier does not exist:

      >>> ExPASy.get_sprot_raw("DOES_NOT_EXIST")
      Traceback (most recent call last):
          ...
      ValueError: Failed to find SwissProt entry 'DOES_NOT_EXIST'

Biopython v: 1.86

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub