o
    RŀgP	                     @   s:   d Z ddlZddlmZ ede 				dd	d
ZdS )zGeneric functions which are useful for working with HMMs.

This just collects general functions which you might like to use in
dealing with HMMs.
    N)BiopythonDeprecationWarningzThe 'Bio.HMM.Utilities' module is deprecated and will be removed in a future release of Biopython. Consider using the hmmlearn package instead.	Emissions
Real StatePredicted StateK   c                 C   s   t t|t|t|d }|| }||}||}||}d}		 |	| t| k r/|}
nt| |	 }
t| | |	|	|    t| ||	|	|    td|||	|	|  f  t| |	| k ridS |	|7 }	q$)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.

       r   Tz%s%s
N)maxlenljustprint)	emissions
real_statepredicted_stateemission_title
real_titlepredicted_title
line_widthtitle_length
seq_lengthcur_position	extension r   E/var/www/html/myenv/lib/python3.10/site-packages/Bio/HMM/Utilities.pypretty_print_prediction   s.   


r   )r   r   r   r   )__doc__warningsBior   warnr   r   r   r   r   <module>   s   