Package Bio :: Package ExPASy
[hide private]
[frames] | no frames]

Package ExPASy

source code

Code to access resources at ExPASy over the WWW.

See http://www.expasy.org/

Functions:
Submodules [hide private]

Functions [hide private]
 
get_prodoc_entry(id, cgi='http://prosite.expasy.org/cgi-bin/prosite/get-prodoc-entry')
Get a text handle to a PRODOC entry at ExPASy in HTML format.
source code
 
get_prosite_entry(id, cgi='http://prosite.expasy.org/cgi-bin/prosite/get-prosite-entry')
Get a text handle to a PROSITE entry at ExPASy in HTML format.
source code
 
get_prosite_raw(id, cgi=None)
Get a text handle to a raw PROSITE or PRODOC record at ExPASy.
source code
 
get_sprot_raw(id)
Get a text handle to a raw SwissProt entry at ExPASy.
source code
 
sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None, cgi='http://www.expasy.ch/cgi-bin/sprot-search-ful')
Search SwissProt by full text (BROKEN).
source code
 
sprot_search_de(text, swissprot=1, trembl=None, cgi='http://www.expasy.ch/cgi-bin/sprot-search-de')
Search SwissProt (BROKEN).
source code
Variables [hide private]
  __package__ = 'Bio.ExPASy'
Function Details [hide private]

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

source code 

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

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

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

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

source code 

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

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

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

get_prosite_raw(id, cgi=None)

source code 

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.

For a non-existing key, ExPASy returns nothing.

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

For a non-existing key, ExPASy returns an error:

>>> handle = get_prosite_raw("does_not_exist")
Traceback (most recent call last):
...
urllib.error.HTTPError: HTTP Error 404: Not Found

get_sprot_raw(id)

source code 

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 http://www.expasy.ch/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

For a non-existing identifier, UniProt returns an error:

>>> ExPASy.get_sprot_raw("DOES_NOT_EXIST")
Traceback (most recent call last):
...
urllib.error.HTTPError: HTTP Error 404: Not Found

sprot_search_de(text, swissprot=1, trembl=None, cgi='http://www.expasy.ch/cgi-bin/sprot-search-de')

source code 

Search SwissProt (BROKEN).

Search by name, description, gene name, species, or organelle.