*ë
Ú!:c       s¼     d  Z    d k Z  d k Z  d k l Z  d d „ Z $ d d „ Z / d d „ Z 8 e d	 e d
 d „ Z	 I d	 e d d „ Z
 Y e e e d d „ Z l h  d	 d „ Z d S(   s»  ExPASy.py

This module provides code to access resources at ExPASy over the WWW.
http://www.expasy.ch/


Functions:
get_prodoc_entry  Interface to the get-prodoc-entry CGI script.
get_prosite_entry Interface to the get-prosite-entry CGI script.
get_sprot_raw     Interface to the get-sprot-raw.pl CGI script.
sprot_search_ful  Interface to the sprot-search-ful CGI script.
sprot_search_de   Interface to the sprot-search-de CGI script.
_open

N(   s   Files-   http://www.expasy.ch/cgi-bin/get-prodoc-entryc    s!      " t  d | |  f ƒ Sd S(   sŒ   get_prodoc_entry(id,
    cgi='http://www.expasy.ch/cgi-bin/get-prodoc-entry') -> handle

    Get a handle to a PRODOC entry at ExPASy.

    s   %s?%sN(   s   _opens   cgis   id(   s   ids   cgi(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   get_prodoc_entry s   s.   http://www.expasy.ch/cgi-bin/get-prosite-entryc    s!   $ + - t  d | |  f ƒ Sd S(   s   get_prosite_entry(id,
    cgi='http://www.expasy.ch/cgi-bin/get-prosite-entry') -> handle

    Get a handle to a PROSITE entry at ExPASy.

    s   %s?%sN(   s   _opens   cgis   id(   s   ids   cgi(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   get_prosite_entry$ s   s-   http://www.expasy.ch/cgi-bin/get-sprot-raw.plc    s!   / 5 6 t  d | |  f ƒ Sd S(   s   get_sprot_raw(id, cgi='http://www.expasy.ch/cgi-bin/get-sprot-raw.pl')
    -> handle

    Get a handle to a raw SwissProt entry at ExPASy.

    s   %s?%sN(   s   _opens   cgis   id(   s   ids   cgi(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   get_sprot_raw/ s   i   s-   http://www.expasy.ch/cgi-bin/sprot-search-fulc    s}   8 ? @ h  |  d <} A | o B d | d <n C | o D d | d <n E | o F d | d <n G t | | ƒ Sd S(   s­   sprot_search_ful(text, make_wild=None, swissprot=1, trembl=None,
    cgi='http://www.expasy.ch/cgi-bin/sprot-search-ful') -> handle

    Search SwissProt by full text.

    s   SEARCHs   ons   makeWilds   Ss   TN(   s   texts	   variabless	   make_wilds	   swissprots   trembls   _opens   cgi(   s   texts	   make_wilds	   swissprots   trembls   cgis	   variables(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   sprot_search_ful8 s   


s,   http://www.expasy.ch/cgi-bin/sprot-search-dec    sb   I Q R h  |  d <} S | o T d | d <n U | o V d | d <n W t | | ƒ Sd S(   sÉ   sprot_search_de(text, swissprot=1, trembl=None,
    cgi='http://www.expasy.ch/cgi-bin/sprot-search-de') -> handle

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

    s   SEARCHs   ons   Ss   TN(   s   texts	   variabless	   swissprots   trembls   _opens   cgi(   s   texts	   swissprots   trembls   cgis	   variables(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   sprot_search_deI s   

s:   http://expasy.cbr.nrc.ca/cgi-bin/scanprosite/scanprosite?1c    sz   Y b c h  } d |  o e |  | d <n f | o g | | d <n h | o i d | d <n j t | | d d ƒSd S(   sZ  scanprosite1(seq=None, id=None, exclude_frequent=None, 
    cgi='http://expasy.cbr.nrc.ca/cgi-bin/scanprosite/scanprosite?1') -> handle
    
    Scan a sequence for a Prosite pattern.  Either a sequence or a SwissProt/
    trEMBL sequence can be passed.  exclude_frequent specifies whether to
    exclude patterns with high probability.
    
    s   SEQs   IDs   oks   boxs   geti    N(   s	   variabless   seqs   ids   exclude_frequents   _opens   cgi(   s   seqs   ids   exclude_frequents   cgis	   variables(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   scanprosite1Y s   		


c    sµ   l t v t  i | ƒ } w | o@ x |  } y | o z d |  | f } n { t  i | ƒ } n } t  i |  | ƒ } € t	 i
 | ƒ } ƒ | i ƒ  o „ t d ‚ n † | Sd S(   sP  _open(cgi, params={}, get=1) -> UndoHandle

    Open a handle to ExPASy.  cgi is the URL for the cgi script to access.
    params is a dictionary with the options to pass to it.  get is a boolean
    that describes whether a GET should be used.  Does some
    simple error checking, and will raise an IOError if it encounters one.

    s   %s?%ss
   no resultsN(   s   urllibs	   urlencodes   paramss   optionss   gets   cgis   fullcgis   urlopens   handles   Files
   UndoHandles   uhandles   peeklines   IOError(   s   cgis   paramss   gets   optionss   uhandles   handles   fullcgi(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   _openl s   
	
(   s   __doc__s   times   urllibs   Bios   Files   get_prodoc_entrys   get_prosite_entrys   get_sprot_raws   Nones   sprot_search_fuls   sprot_search_des   scanprosite1s   _open(
   s   get_prodoc_entrys   sprot_search_des   sprot_search_fuls   Files   get_prosite_entrys   urllibs   get_sprot_raws   scanprosite1s   times   _open(    (    s'   /mit/seven/lib/python/Bio/WWW/ExPASy.pys   ? s   
	