
    DUf                     (    d Z ddlZg Zd Zd Zd ZdS )ze
Provides access to example files and keeps track of all temp files created
during a Python session.
    Nc                      t           j                            t           j                            t                    dd          S )za
    Returns the data directory that contains example files for tests and
    documentation.
    testdata)ospathjoindirname__file__     Q/var/www/html/software/conda/lib/python3.11/site-packages/pybedtools/filenames.pydata_dirr   
   s*    
 7<<1166BBBr   c                     t           j                            t                      |           } t           j                            |           sd| z  }t          |          | S )z
    Return a bed file from the pybedtools examples directory.  Use
    func:`list_example_files` to see a list of files that are included.
    z%s does not exist)r   r   r   r   existsFileNotFoundError)fnmsgs     r   example_filenamer      sP    
 
hjj"	%	%B7>>" %!B&$$$Ir   c                      t          j        t                                } dfd| D             }t          |          S )a~  
    Returns a list of files in the examples dir.  Choose one and pass it to
    :func:`example_filename` to get the full path to an example file.

    Example usage:

        >>> from pybedtools import BedTool
        >>> choices = list_example_files()
        >>> assert 'a.bed' in choices
        >>> bedfn = example_filename('a.bed')
        >>> mybedtool = BedTool(bedfn)

    )z.bedz.gffz.gtfz.bed.gzz.bamz.gff.gzc                 >    g | ]}|                               |S r   )endswith).0fextss     r   
<listcomp>z&list_example_files.<locals>.<listcomp>.   s*    >>>qQZZ-=-=>>>>r   )r   listdirr   sorted)candidate_fns	valid_fnsr   s     @r   list_example_filesr       sD     Jxzz**MAD>>>>M>>>I)r   )__doc__r   	TEMPFILESr   r   r    r   r   r   <module>r#      sY     
				C C C	 	 	    r   