B
    ‰°b€  ã               @   s   d Z ddd„ZdS )	z’Generic functions which are useful for working with HMMs.

This just collects general functions which you might like to use in
dealing with HMMs.
Ú	Emissionsú
Real StateúPredicted StateéK   c             C   sà   t t|ƒt|ƒt|ƒƒd }|| }| |¡}| |¡}| |¡}d}	x”|	| t| ƒk r^|}
nt| ƒ|	 }
td|| |	|	| … f ƒ td|||	|	| … f ƒ td|||	|	| … f ƒ t| ƒ|	| k rÐP |	|7 }	qHW dS )a=  Print out a state sequence prediction in a nice manner.

    Arguments:
     - emissions -- The sequence of emissions of the sequence you are
       dealing with.
     - real_state -- The actual state path that generated the emissions.
     - predicted_state -- A state path predicted by some kind of HMM model.

    é   é    z%s%sz%s%s
N)ÚmaxÚlenÚljustÚprint)Z	emissionsZ
real_stateZpredicted_stateZemission_titleZ
real_titleZpredicted_titleZ
line_widthZtitle_lengthZ
seq_lengthZcur_positionÚ	extension© r   ú0lib/python3.7/site-packages/Bio/HMM/Utilities.pyÚpretty_print_prediction   s,    


r   N)r   r   r   r   )Ú__doc__r   r   r   r   r   Ú<module>   s      