ó
vJ/Ic           @   s   d  Z  d d d d d „ Z d S(   s’   Generic functions which are useful for working with HMMs.

This just collects general functions which you might like to use in
dealing with HMMs.
t	   Emissionss
   Real States   Predicted StateiK   c         C   s  t  t | ƒ t | ƒ t | ƒ ƒ d } | | } | j | ƒ } | j | ƒ } | j | ƒ } d }	 x® |	 | t |  ƒ k  r‡ | }
 n t |  ƒ |	 }
 d | |  j |	 |	 | !f GHd | | j |	 |	 | !f GHd | | j |	 |	 | !f GHt |  ƒ |	 | k  rPn  |	 | 7}	 qh Wd S(   s=  Print out a state sequence prediction in a nice manner.

    Arguments:
    
    o emissions -- The sequence of emissions of the sequence you are
    dealing with.

    o real_state -- The actual state path that generated the emissions.

    o predicted_state -- A state path predicted by some kind of HMM model.
    i   i    s   %s%ss   %s%s
N(   t   maxt   lent   ljustt   data(   t	   emissionst
   real_statet   predicted_statet   emission_titlet
   real_titlet   predicted_titlet
   line_widtht   title_lengtht
   seq_lengtht   cur_positiont	   extension(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/HMM/Utilities.pyt   pretty_print_prediction   s,    
			N(   t   __doc__R   (    (    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/HMM/Utilities.pyt   <module>   s   