U
    f                     @   s   d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d d	lmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlZd dlZd dlmZmZ edddZdS )    )Logo)Glyph)list_font_names)transform_matrix)sequence_to_matrix)alignment_to_matrix)saliency_to_matrix)validate_matrix)list_color_schemes)list_example_matrices)get_example_matrix)list_example_datafiles)open_example_datafile)	run_testsN)checkhandle_errorsfig1bc           	   	      s   dt jt  t  } fdd|D }i }|D ]"}|dd dd }|||< q4t| | kdt| | f  ||  }t	|d	&}|
 }d
}td||||f  W 5 Q R X tt	|
  t S )z
    Performs a demonstration of the Logomaker software.

    parameters
    -----------

    name: (str)
        Must be one of {'fig1b', 'fig1c', 'fig1d', 'fig1e', 'fig1f', 'logo'}.

    returns
    -------
    None.

    z%s/examplesc                    s$   g | ]}t d |rd |f qS )zdemo_.*\.pyz%s/%s)rematch).0Z	temp_nameZexample_dir 9/tmp/pip-target-lpfmz8o1/lib/python/logomaker/__init__.py
<listcomp>,   s   zdemo.<locals>.<listcomp>_Nz)name = %s is not valid. Must be one of %srz=-------------------------------------------------------------zRunning %s:
%s
%s
%s)ospathdirname__file__listdirsplitr   keysrepropenreadprintexecpltZgcf)	nameZall_base_file_namesZexample_file_namesZexamples_dict	file_namekeyfcontentliner   r   r   demo   s.    



r1   )r   )Zlogomaker.src.Logor   Zlogomaker.src.Glyphr   r   Zlogomaker.src.matrixr   r   r   r   Zlogomaker.src.validater	   Zlogomaker.src.colorsr
   Zlogomaker.src.examplesr   r   r   r   Z*logomaker.tests.functional_tests_logomakerr   Zmatplotlib.pyplotZpyplotr*   r   r   Zlogomaker.src.error_handlingr   r   r1   r   r   r   r   <module>   s&   