
    tf                        d dl ZddlmZ g dZd Zd Zd Zd Z eej                  j                        d	d
ej                  ddfd       Z
 eej                  j                        d	d
ej                  ddfd       Z eej                  j                        dd       Z eej                  j                        dd       Zy)    N   )cbbi)info
chromsizeszoomsfetch_intervalsfetchstackupc                       fd}|S )Nc                 *    j                   | _         | S N)__doc__)targetoriginals    R/var/www/html/software/conda/envs/higlass/lib/python3.12/site-packages/bbi/_bbi.pywrapperzdocumented_by.<locals>.wrapper	   s    !))     )r   r   s   ` r   documented_byr      s     Nr   c                 p    t        j                  |       5 }|j                  cddd       S # 1 sw Y   yxY w)a	  
    Fetch the chromosome list of a bbi file. Returns an ordered dictionary of
    chromosome names mapped to their sizes in bp.

    Parameters
    ----------
    inFile : str
        Path to BigWig or BigBed file.

    Returns
    -------
    dict[str, int]

    N)r   openr   inFilefs     r   r   r      s.     
6	 a||     ,5c                 p    t        j                  |       5 }|j                  cddd       S # 1 sw Y   yxY w)a  
    Fetch the zoom levels of a bbi file. Returns a list of "reduction levels",
    i.e. the number of bases per summary item, i.e. the bin size.

    Parameters
    ----------
    inFile : str
        Path to BigWig or BigBed file.

    Returns
    -------
    list[int]

    N)r   r   r   r   s     r   r   r   #   s.     
6	 aww  r   c                 p    t        j                  |       5 }|j                  cddd       S # 1 sw Y   yxY w)z
    Returns a dict of information about the bbi file.

    Parameters
    ----------
    inFile : str
        Path to BigWig or BigBed file.

    Returns
    -------
    dict

    N)r   r   r   r   s     r   r   r   6   s.     
6	 avv  r   g        meanFc	                     t        j                  |       5 }	|	j                  ||||||||      cd d d        S # 1 sw Y   y xY wr   )r   r   r	   )
r   chromstartendbinsmissingoobsummaryexactr   s
             r   r	   r	   H   sE     
6	 NawwueS$guMN N N	   8Ac	                     t        j                  |       5 }	|	j                  ||||||||      cd d d        S # 1 sw Y   y xY wr   )r   r   r
   )
r   chromsstartsendsr$   r%   r&   r'   r(   r   s
             r   r
   r
   X   sE     
6	 SayytWc7ERS S Sr)   c                     t        j                  |       5 }|j                  ||||      cd d d        S # 1 sw Y   y xY wr   )r   r   r   )r   r!   r"   r#   iteratorr   s         r   r   r   h   s9    	6	 >a  sH=> > >   4=c                     t        j                  |       5 }|j                  ||||      cd d d        S # 1 sw Y   y xY wr   )r   r   fetch_summaries)r   r!   r"   r#   zoomr   s         r   r2   r2   n   s9    	6	 :a  sD9: : :r0   )T)r   )numpynp r   __all__r   r   r   r   BBIFiler	   nanr
   r   r2   r   r   r   <module>r:      s     
P&&$ t||!!" 


N #N t||##$ 


S %S t||++,> ->
 t||++,: -:r   