
Y_Sc        )   @@  s  d  Z  d d l m Z d d l m Z m Z m Z d d l m Z d d d d	 d
 d d d d d d d g Z i d d 6d d 6d d 6d d	 6d d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6Z	 d   Z
 d   Z d    Z d! Z d" Z d# Z d$ Z d% Z d& Z d' Z i d( d( 6d) d) 6d* d* 6d+ d+ 6d, d- 6d. d/ 6d0 d1 6d2 d3 6d4 d5 6d6 d7 6d8 d9 6d: d; 6d< d= 6d> d? 6d$ d@ 6d$ dA 6Z i d( d( 6d) d) 6d* d* 6dB dB 6d, d- 6d. d/ 6dC d1 6d2 d3 6dD d5 6dE d7 6d8 d9 6dF d; 6dG d= 6dH d? 6d& d@ 6d& dA 6Z i d( d( 6dI d? 6d) d) 6d= d= 6dJ dJ 6dK dK 6d* d* 6d; d; 6dL dL 6d7 d7 6dM dM 6d- d- 6dA dA 6dN dN 6dO dO 6d/ d/ 6d3 d3 6d+ d+ 6d9 d9 6d1 d1 6d! d@ 6d5 d5 6dP dQ 6dR dS 6dB dB 6dT dT 6Z i dU d( 6dV d? 6dW d) 6dX d= 6dY dJ 6dZ dK 6d[ d* 6d\ d; 6d] dL 6d] dS 6d^ d7 6d] dM 6d_ d- 6d` dA 6da dN 6db dO 6dc d/ 6dd d3 6de d+ 6df dB 6dg d9 6dh d1 6di d@ 6dj d5 6dk dQ 6Z i dl d( 6dm d) 6dn d* 6do d+ 6Z i dn d( 6dp d) 6dq d* 6dr dB 6Z i ds d( 6dt d? 6du d) 6dv d= 6dw dJ 6dx dK 6dy d* 6dz d; 6d{ dL 6d| d7 6d} dM 6d~ d- 6d dA 6d dN 6d dO 6d d/ 6d d3 6d d+ 6d d9 6d d1 6d d5 6d dQ 6d d@ 6d dB 6d dS 6d dT 6Z e j e  Z i d= d 6d; d 6dJ d 6d/ d 6d/ d 6d( d 6d( ds 6d( d 6d+ d 6d7 d 6d/ d 6d/ d 6d= d 6d= d 6d= d 6d= d 6dA d 6d= dv 6d= d 6d? dt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d5 dId9 dJ Z  e d( dKd/ dLdA dMd= dMd) dNdO dMdJ dMd* dOd; dPdL dQdM dRd7 dSd- dTdK dUdN dVd3 dWd+ dXd1 dYd5 dZd9 d[ Z! i d\d( 6d]d) 6d^d* 6d_d+ 6d`dB 6dad/ 6dbd5 6dcd7 6ddd- 6ded3 6dfd1 6dgd? 6dhd= 6did; 6djd9 6dkdA 6d6d76Z" i dld( 6dmd) 6dnd= 6dodJ 6dpdK 6dqd* 6drd; 6dsdL 6dtd7 6dudM 6dvd- 6dwdA 6dxdN 6dydO 6dzd/ 6d{d3 6d|d+ 6d|d9 6d}d1 6d~d5 6Z# dS(  s
  
Standard data used in computational biology.


To convert a property dictionary to a list :
>>> comp = [ amino_acid_composition[k] for k in amino_acid_letters]



Resources: 
    Various standard data files are included in the corebio distribution. These
    may be loaded with the data_string, data_stream or data_filename methods.
    A complete set of names is stored in 'resource_names'
 
BLOSUM Scoring Matrices
    Source: ftp://ftp.ncbi.nih.gov/repository/blocks/unix/blosum
    These are all new blast style with 1/3 bit scaling
    - blosum35
    - blosum45    
    - blosum62    
    - blosum40    
    - blosum50    
    - blosum80    
    - blosum100   

Other substitution scoring matrices:
    - dist20_comp 
    - pam250
    - pam120
    - vtml160
    
Description of database cross references :
    - dbxref.txt (http://www.expasy.org/cgi-bin/lists?dbxref.txt)

    
Attributes:
    - amino_acid_letters
        -- Standard codes for the 20 canonical amino acids, in alphabetic
        order.
        
    - amino_acid_alternative_letters
        -- Amino acid one letter codes, alphabetic by three letter codes.

    - amino_acid_extended_letters

    - dna_letters

    - dna_extended_letters

    - rna_letters
    
    - rna_extended_letters

    - dna_ambiguity 

    - rna_ambiguity
    
    - amino_acid_ambiguity
    
    - amino_acid_mass
        -- Monomer isotopically averaged molecular mass 
    
    - dna_mass
    
    - rna_mass
        
    - one_to_three      
        -- Map from standard 1 letter amino acid codes to standard three
        letter codes. 
        Ref: http://www.ebi.ac.uk/RESID/faq.html
      
    - standard_three_to_one
        -- Map from standard 3 letter amino acid codes to standard 1
        letter codes.
         
    - extended_three_to_one
        -- Map between three letter amino acid codes (first letter capitalized) 
        and standard one letter codes. This map contains many nonstandard three
        letter codes, used, for example, to specify chemically modified amino
        acids in PDB files.
        Ref: http://astral.berkeley.edu/ 
        Ref: http://www.ebi.ac.uk/RESID/faq.html

    - amino_acid_names

    - amino_acid_composition
        -- Average amino acid composition of proteins.
        Ref: McCaldon P., Argos P. Proteins 4:99-122 (1988).

    - kyte_doolittle_hydrophobicity 
        -- Kyte-Doolittle hydrophobicity scale.
        Ref: Kyte J., Doolittle R.F. J. Mol. Biol. 157:105-132 (1982)
        
    - nucleotide_names
    
    - amino_acid_accesible_surface_area
        -- Nominal maximum solvent accessoble area for unmodified amino acids,
        in square Angstroms.
        Ref: Sander & Rost, (1994), Proteins, 20:216-226


Status: Beta (Data needs to be proof checked.)    
i    (   t   absolute_importi   (   t   resource_stringt   resource_streamt   resource_filename(   t   utilst   blosum35t   blosum45t   blosum62t   blosum40t   blosum50t   blosum80t	   blosum100t   dist20_compt   pam250t   pam120s
   dbxref.txtt   vtml160s   data/blosum35.mats   data/blosum45.mats   data/blosum62.mats   data/blosum40.mats   data/blosum50.mats   data/blosum80.mats   data/blosum100.mats   data/dist20_comp.mats   data/pam250.mats   data/pam120.mats   data/dbxref.txts   data/vtml160c         C@  s   t  |  } t t | t  S(   s(   Load the specified resource as a string.(   t   _resource_filenamesR   t   __name__t   __file__(   t   namet   fn(    (    s6   /home/psgendb/BIRCHDEV/pkg/weblogo-3.4/corebio/data.pyt   data_string   s    
c         C@  s   t  |  } t t | t  S(   s6   Provide an open file handle to the specified resource.(   R   R   R   R   (   R   R   (    (    s6   /home/psgendb/BIRCHDEV/pkg/weblogo-3.4/corebio/data.pyt   data_stream   s    
c         C@  s   t  |  } t t | t  S(   sB   Provide a filename for the given resource in the local filesystem.(   R   R   R   R   (   R   R   (    (    s6   /home/psgendb/BIRCHDEV/pkg/weblogo-3.4/corebio/data.pyt   data_filename   s    
t   ACDEFGHIKLMNPQRSTVWYt   ARNDCQEGHILKMFPSTWYVs   ACDEFGHIKLMNOPQRSTUVWYBJZX*-t   GATCt   GATCRYWSMKHBVDNt   GAUCt   GAUCRYWSMKHBVDNt   At   Ct   Gt   Tt   ACt   Mt   AGt   Rt   ATt   Wt   CGt   St   CTt   Yt   GTt   Kt   ACGt   Vt   ACTt   Ht   AGTt   Dt   CGTt   Bt   Xt   Nt   Ut   AUt   CUt   GUt   ACUt   AGUt   CGUt   NDt   Et   Ft   It   Lt   Pt   Qt   QEt   Zt   ILt   Jt   Og(\EV@gQ`@g
ףp=J^@g33333`@g\(db@gGzd@gGzR@gQec@g(\e`@gGzFb@gQb@gp=
׃`@gQ\@gDb@gfffffe@g(\EZ@gHz]@ge@gI]@g(\i@g$`@gGzf@gQXb@g     u@g     0t@g     v@g      t@g     s@g     w@g     @u@t   Alat   Asxt   Cyst   Aspt   Glut   Phet   Glyt   Hist   Ilet   Lyst   Leut   Mett   Asnt   Prot   Glnt   Argt   Sert   Thrt   Valt   Trpt   Tyrt   Glxt   Xaat   Sect   Xlet   Pylt   2ast   3aht   5hpt   Aclt   Agmt   Aibt   Almt   Alot   Alyt   Armt   Asat   Asbt   Askt   Aslt   Asqt   Ayat   Bcst   Bhdt   Bmtt   Bnnt   Buct   Bugt   C5ct   C6ct   Ccst   Ceat   Cgut   Chgt   Clet   Cmet   Csdt   Csot   Cspt   Csst   Cswt   Csxt   Cxmt   Cy1t   Cy3t   Cygt   Cymt   Cyqt   Daht   Dalt   Dart   Dast   Dcyt   Dglt   Dgnt   Dhat   Dhit   Dilt   Divt   Dlet   Dlyt   Dnpt   Dpnt   Dprt   Dsnt   Dspt   Dtht   Dtrt   Dtyt   Dvat   Efct   Flat   Fmet   Gglt   Gl3t   Glzt   Gmat   Gsct   Hact   Hart   Hict   Hipt   Hmrt   Hpqt   Htrt   Hypt   Iilt   Iyrt   Kcxt   Llpt   Llyt   Ltrt   Lymt   Lyzt   Maat   Ment   Mhst   Mist   Mlet   Mpqt   Msat   Mset   Mvat   Nemt   Nept   Nlet   Nlnt   Nlpt   Nmct   Oast   Ocst   Omtt   Paqt   Pcat   Pect   Phit   Phlt   Pr3t   Prrt   Ptrt   Sact   Sart   Scht   Scst   Scyt   Selt   Sept   Sett   Shct   Shrt   Smct   Soct   Styt   Svat   *t   Tert   Tiht   Tplt   Tpot   Tpqt   Trgt   Trot   Tybt   Tyqt   Tyst   Tyyt   Unkt   Xert   alaninet
   methioninet   cysteinet
   asparagines   aspartic acidt   prolines   glutamic acidt	   glutaminet   phenylalaninet   argininet   glycinet   serinet	   histidinet	   threoninet
   isoleucinet   valinet   lysinet
   tryptophant   leucinet   tyrosines   aspartic acid or asparagines   leucine or isoleucinet   unknowns   glutamic acid or glutaminet   selenocysteinet   pyrrolysines   translation stopt   gapt   -gˡE?gv/?gI+?gA`"?g rh?g{Gz?gX9v?g;On?gI+?g9v?g
ףp=
?g~jt?g+?g&1?gDl?gV-?g9v?gMb?gL7A`?g?g      g      g      @gٿg	g      @gffffff@g333333gffffff?gffffff@gggffffffggg@t	   Adenosinet   Cytidinet   Guaninet	   Thymidinet   Uracils   G A (puRine)s   T C (pYrimidine)s   G T (Ketone)s   A C (aMino group)s   G C (Strong interaction)s   A T (Weak interaction)s   G T C (not A) (B comes after A)s   G A T (not C) (D comes after C)s   A C T (not G) (H comes after G)s&   G C A (not T, not U) (V comes after U)s   A G C T (aNy)g     Z@g     `@g     `d@g     @h@g     h@g      U@g      g@g      e@g     i@g     d@g     g@g     c@g      a@g     h@g      o@g     @`@g     a@g     `l@g     k@N($   t   __doc__t
   __future__R    R   R   R   R   t    t   resource_namesR   R   R   R   t   amino_acid_letterst   amino_acid_alternative_letterst   amino_acid_extended_letterst   dna_letterst   dna_extended_letterst   rna_letterst   rna_extended_letterst   dna_ambiguityt   rna_ambiguityt   amino_acid_ambiguityt   amino_acid_masst   dna_masst   rna_masst   one_to_threet   invert_dictt   standard_three_to_onet   extended_three_to_onet   amino_acid_namest   dictt   amino_acid_compositiont   kyte_doolittle_hydrophobicityt   nucleotide_namest!   amino_acid_accesible_surface_area(    (    (    s6   /home/psgendb/BIRCHDEV/pkg/weblogo-3.4/corebio/data.pyt   <module>   s  	
			





    

!!
