B
    h}\J5                 @   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dddddddddddddZ	e
e
dd d!Ze
edd"d#Ze
e
dd$d%Zd&Zd'Zd(Zd)Zd*Zd+Zd,Zd-d.d/d0d1d2d3d4d5d6d7d8d9d:d)d)d;Zd-d.d/d<d1d2d=d4d>d?d7d@dAdBd+d+dCZd-dDd.dEdFdGd/dHdIdJdKdLdMdNdOdPdQd0dRdSd&dTdUdVd<dWdXZdYdZd[d\d]d^d_d`dadadbdadcdddedfdgdhdidjdkdldmdndodpZdqdrdsdtduZdsdvdwdxdyZdzd{d|d}d~ddddddddddddddddddddddZeeZdEdHdFdPdPd-d-d-d0dJdPdPdEdEdEdEdMdEdEdd-d.dEd0d-d.dKd.d.d.d.dFd-dKd.d-d.d.d.d.d.dLd.d.d.d.d.d.dGd-dPdEd.dFdOd-dHdIdRdKdJd-dGdNdQdEd0dSdTdRd.d-dLdFd/dOdFdd/d/dFd/d-dPdHdHdHdPdGdSdNdIdIdTdJdKdJdJdSdJdJdJd-dMdLdHdQdKd/d/dLdRdHdHdKdKdKd/dQd.dLdTdFd.dGdGdGd.dNd-dTdWdQd/d.d.d.d<d<dQdQdQd.dJd.d.dTdQdd0d-dSd0d-dJdSdSdTdTdTdTdTddRddddZdddddddddddddddddddddddddddddZe dddddddddddddddddddddˍZ!e dddddddddddddddddddddˍZ"ddddddddddddddddddZ#dddddddddddddddddddd dZ$dS (  ao
  
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 weblogo 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.)
    )TextIO   )resource_stringresource_streamresource_filename)utilsblosum35blosum45blosum62blosum40blosum50blosum80	blosum100dist20_comppam250pam120z
dbxref.txtvtml160zdata/blosum35.matzdata/blosum45.matzdata/blosum62.matzdata/blosum40.matzdata/blosum50.matzdata/blosum80.matzdata/blosum100.matzdata/dist20_comp.matzdata/pam250.matzdata/pam120.matzdata/dbxref.txtzdata/vtml160)r   r	   r
   r   r   r   r   r   r   r   z
dbxref.txtr   )namereturnc             C   s   t |  }tt|tS )z(Load the specified resource as a string.)_resource_filenamesr   __name____file__)r   fn r   V/home/fristb/BIRCH/lib-linux-x86_64/python/lib/python3.7/site-packages/weblogo/data.pydata_string   s    r   c             C   s   t |  }tt|tS )z6Provide an open file handle to the specified resource.)r   r   r   r   )r   r   r   r   r   data_stream   s    r   c             C   s   t |  }tt|tS )zBProvide a filename for the given resource in the local filesystem.)r   r   r   r   )r   r   r   r   r   data_filename   s    r   ZACDEFGHIKLMNPQRSTVWYZARNDCQEGHILKMFPSTWYVzACDEFGHIKLMNOPQRSTUVWYBJZX*-ZGATCZGATCRYWSMKHBVDNZGAUCZGAUCRYWSMKHBVDNACGTZACZAGATZCGZCTGTZACGZACTZAGTZCGT)r   r   r    r!   MRWSYKVHDBXNUZAUZCUZGUZACUZAGUZCGU)r   r   r    r0   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   ZNDr,   EFr+   Ir)   Lr$   r/   PQr%   r'   r*   r&   r(   ZQEZILO)r   r-   r   r,   r1   r2   r    r+   r3   r)   r4   r$   r/   r5   r6   r%   r'   r!   r*   r&   r.   r(   ZJr0   r7   g(\EV@gQ`@g
ףp=J^@g33333`@g\(db@gGzd@gGzR@gQec@g(\e`@gGzFb@gQb@gp=
׃`@gQ\@gDb@gfffffe@g(\EZ@gHz]@ge@gI]@g(\i@g$`@gGzf@gQXb@)r   r-   r   r,   r1   r2   r    r+   r3   r9   r)   r4   r$   r/   r5   r6   r%   r'   r!   r0   r*   r&   r.   r(   r8   g     u@g     0t@g     v@g      t@)r   r   r    r!   g     s@g     w@g     @u@)r   r   r    r0   AlaAsxCysAspGluPheGlyHisIleLysLeuMetAsnProGlnArgSerThrValTrpTyrGlxXaaSecXlePyl)r   r-   r   r,   r1   r2   r    r+   r3   r)   r4   r$   r/   r5   r6   r%   r'   r!   r*   r&   r(   r8   r.   r0   r9   r7   r-   r8   *r.   r9   )Z2asZ3ahZ5hpZAclZAgmZAibr:   ZAlmZAloZAlyrI   ZArmZAsaZAsbZAskZAslrF   r=   ZAsqr;   ZAyaZBcsZBhdZBmtZBnnZBucZBugZC5cZC6cZCcsZCeaZCguZChgZCleZCmeZCsdZCsoZCspZCssZCswZCsxZCxmZCy1ZCy3ZCygZCymZCyqr<   ZDahZDalZDarZDasZDcyZDglZDgnZDhaZDhiZDilZDivZDleZDlyZDnpZDpnZDprZDsnZDspZDthZDtrZDtyZDvaZEfcZFlaZFmeZGglZGl3rH   r>   rO   r@   ZGlzZGmaZGscZHacZHarZHicZHiprA   ZHmrZHpqZHtrZHypZIilrB   ZIyrZKcxrD   ZLlpZLlyZLtrZLymrC   ZLyzZMaaZMenrE   ZMhsZMisZMleZMpqZMsaZMseZMvaZNemZNepZNleZNlnZNlpZNmcZOasZOcsZOmtZPaqZPcaZPecr?   PhiZPhlZPr3rG   ZPrrZPtrrS   ZSacZSarZSchZScsZScyrQ   ZSelSeprJ   SetZShcZShrZSmcZSocZStyZSvaZTerrK   ZTihZTplZTpoZTpqZTrgZTrorM   ZTybZTyqrN   ZTysZTyyZUnkrL   rP   ZXerrR   ZalanineZ
methionineZcysteineZ
asparaginezaspartic acidZprolinezglutamic acidZ	glutamineZphenylalanineZarginineZglycineZserineZ	histidineZ	threonineZ
isoleucineZvalineZlysineZ
tryptophanZleucineZtyrosinezaspartic acid or asparaginezleucine or isoleucineunknownzglutamic acid or glutamineZselenocysteineZpyrrolysineztranslation stopZgap)r   r$   r   r/   r,   r5   r1   r6   r2   r%   r    r'   r+   r!   r3   r*   r)   r&   r4   r(   r-   r9   r.   r8   r0   r7   rT   -gˡE?gv/?gI+?gA`"?g rh?g{Gz?gX9v?g;On?gI+?g9v?g
ףp=
?g~jt?g+?g&1?gDl?gV-?g9v?gMb?gL7A`?)r   r%   r/   r,   r   r6   r1   r    r+   r3   r4   r)   r$   r2   r5   r'   r!   r&   r(   r*   g?g      g      g      @gٿg	g      @gffffff@g333333gffffff?gffffff@gggffffffggg@Z	AdenosineZCytidineZGuanineZ	ThymidineZUracilzG A (puRine)zT C (pYrimidine)zG T (Ketone)zA C (aMino group)zG C (Strong interaction)zA T (Weak interaction)zG T C (not A) (B comes after A)zG A T (not C) (D comes after C)zA C T (not G) (H comes after G)z&G C A (not T, not U) (V comes after U)zA G C T (aNy))r   r   r    r!   r0   r%   r(   r)   r$   r'   r&   r-   r,   r+   r*   r/   rY   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@)r   r   r,   r1   r2   r    r+   r3   r)   r4   r$   r/   r5   r6   r%   r'   r!   r*   r&   r(   N)%__doc__Z	typing.ior   r   r   r   r    Zresource_namesr   strr   r   r   Zamino_acid_lettersZamino_acid_alternative_lettersZamino_acid_extended_lettersZdna_lettersZdna_extended_lettersZrna_lettersZrna_extended_lettersZdna_ambiguityZrna_ambiguityZamino_acid_ambiguityZamino_acid_massZdna_massZrna_massZone_to_threeZinvert_dictZstandard_three_to_oneZextended_three_to_oneZamino_acid_namesdictZamino_acid_compositionZkyte_doolittle_hydrophobicityZnucleotide_namesZ!amino_acid_accesible_surface_arear   r   r   r   <module>   s  






