
    tfe                       d dl mZ d dlZd dlZd dlZd dlZd dlZ	d dl
mZ d dlmZ ddlmZmZmZmZmZmZmZmZ ddlmZ ddlmZmZmZmZ d	d
gZh dZ G d d	      Z ddZ!	 	 	 d	 	 	 	 	 	 	 	 	 ddZ"	 	 	 d	 	 	 	 	 	 	 	 	 ddZ#	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddZ$	 d	 	 	 	 	 	 	 ddZ%	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ&y)    )annotationsN)is_integer_dtype)
coo_matrix   )	CSRReaderDirectRangeQuery2DFillLowerRangeQuery2DRangeSelector1DRangeSelector2Dgetregion_to_extentregion_to_offset)list_coolers)closing_hdf5	open_hdf5parse_cooler_uriparse_regionCoolerannotate>   KRVCVC_SQRTc                     e Zd ZdZdddZddZddZddZdddZe	dd       Z
e	dd	       Ze	dd
       Ze	dd       Zd dZd!dZe	d"d       Ze	d#d       Zd$dZd$dZd%d&dZ	 	 	 	 	 	 	 	 d'	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d(dZddZy))r   a]  
    A convenient interface to a cooler data collection.

    Parameters
    ----------
    store : str, :py:class:`h5py.File` or :py:class:`h5py.Group`
        Path to a cooler file, URI string, or open handle to the root HDF5
        group of a cooler data collection.
    root : str, optional [deprecated]
        HDF5 Group path to root of cooler group if ``store`` is a file.
        This option is deprecated. Instead, use a URI string of the form
        :file:`<file_path>::<group_path>`.
    kwargs : optional
        Options to be passed to :py:class:`h5py.File()` upon every access.
        By default, the file is opened with the default driver and mode='r'.

    Notes
    -----
    If ``store`` is a file path, the file will be opened temporarily in
    when performing operations. This allows :py:class:`Cooler` objects to be
    serialized for multiprocess and distributed computations.

    Metadata is accessible as a dictionary through the :py:attr:`info`
    property.

    Table selectors, created using :py:meth:`chroms`, :py:meth:`bins`, and
    :py:meth:`pixels`, perform range queries over table rows,
    returning :py:class:`pd.DataFrame` and :py:class:`pd.Series`.

    A matrix selector, created using :py:meth:`matrix`, performs 2D matrix
    range queries, returning :py:class:`numpy.ndarray` or
    :py:class:`scipy.sparse.coo_matrix`.

    Nc                   t        |t              r|t        |      \  | _        | _        nXt        j                  |      r8t        |fi |5 }|j                  j                  | _        || _        d d d        nt        d      | j                  dz   | j                  z   | _
        | j                  | _        || _        ne|j                  j                  | _        |j                  | _        | j                  dz   | j                  z   | _
        |j                  | _        i | _        | j                          y # 1 sw Y   xY w)Nz!Not a valid path to a Cooler file::)
isinstancestrr   filenamerooth5pyis_hdf5r   file
ValueErroruristoreopen_kwsname_refresh)selfr%   r   kwargsh5s        T/var/www/html/software/conda/envs/higlass/lib/python3.12/site-packages/cooler/api.py__init__zCooler.__init__D   s    eS!|+;E+B(tye$u// %2$&GG$4$4DM $DI% % !!DEE}}t+dii7DHDJ"DM "JJ//DM

DI}}t+dii7DHDJDM% %s   #D44D=c                   	 t        | j                  fi | j                  5 }|| j                     }t	        |      }|d   j                  t              |d<   |j                  d      d   | _        t        t        |d   t        t        |                        | _        t        |      | _        | j                  j!                  dd      }|dk(  | _        d d d        y # 1 sw Y   y xY w# t$        $ rI d| j                   d}t'        | j                        }t        |      r|d| dd	z   z  }t%        |      d w xY w)
Nr'   lengthstorage-modesymmetric-upperzNo cooler found at: .z Coolers found in z. z Use '::' to specify a group path)r   r%   r&   r   chromsastypeobject	set_index_chromsizesdictziprangelen	_chromidsinfo_infor   _is_symm_upperKeyErrorr   )r)   r+   grp_ctmodeerr_msglistings          r,   r(   zCooler._refreshZ   s,   	.4::77 @2mSk!&k008F#&==#8#B !%c#f+uSX&G!H!#Y
zz~~n6GH&*.?&?#@ @ @  	.,TZZL:G"4::.G7|(	489 7#-	.s*    C+ B4CC+ C($C+ (C+ +AD=c                    t        | j                  fi | j                  5 }|| j                     }||   d d  cd d d        S # 1 sw Y   y xY wN)r   r%   r&   r   r)   pathr+   rA   s       r,   
_load_dsetzCooler._load_dseto   sF    tzz3T]]3 	 rTYY-Ct9Q<	  	  	 s   AAc                    t        | j                  fi | j                  5 }|| j                     }t	        ||   j
                        cd d d        S # 1 sw Y   y xY wrG   )r   r%   r&   r   r8   attrsrH   s       r,   _load_attrszCooler._load_attrst   sK    tzz3T]]3 	)rTYY-CD	(	) 	) 	)s   'AAc                t    t        j                  | j                  |fi || j                     }t	        |      S )a  Open the HDF5 group containing the Cooler with :py:mod:`h5py`

        Functions as a context manager. Any ``open_kws`` passed during
        construction are ignored.

        Parameters
        ----------
        mode : str, optional [default: 'r']
            * ``'r'`` (readonly)
            * ``'r+'`` or ``'a'`` (read/write)

        Notes
        -----
            For other parameters, see :py:class:`h5py.File`.

        )r    Filer   r   r   )r)   rC   r*   rA   s       r,   openzCooler.openy   s1    " iit6v6tyyAC      c                :    | j                   j                  dd      S )zIndicates whether ordinary sparse matrix encoding is used
        (``"square"``) or whether a symmetric matrix is encoded by storing only
        the upper triangular elements (``"symmetric-upper"``).
        r0   r1   )r>   r   r)   s    r,   storage_modezCooler.storage_mode   s     zz~~n.?@@rQ   c                     | j                   d   S )z-Resolution in base pairs if uniform else Nonezbin-sizer>   rS   s    r,   binsizezCooler.binsize   s     zz*%%rQ   c                    | j                   S )z=Ordered mapping of reference sequences to their lengths in bp)r7   rS   s    r,   
chromsizeszCooler.chromsizes   s     rQ   c                @    t        | j                  j                        S )z List of reference sequence names)listr7   indexrS   s    r,   
chromnameszCooler.chromnames   s     D$$**++rQ   c           	         t        | j                  fi | j                  5 }|| j                     }t	        || j
                  t        || j                        | j                        cddd       S # 1 sw Y   yxY w)a'  Bin ID containing the left end of a genomic region

        Parameters
        ----------
        region : str or tuple
            Genomic range

        Returns
        -------
        int

        Examples
        --------
        >>> c.offset('chr3')  # doctest: +SKIP
        1311

        N)	r   r%   r&   r   r   r<   r   r7   rW   r)   regionr+   rA   s       r,   offsetzCooler.offset   f    $ tzz3T]]3 	rTYY-C#VT%5%56		 	 	   AA00A9c           	         t        | j                  fi | j                  5 }|| j                     }t	        || j
                  t        || j                        | j                        cddd       S # 1 sw Y   yxY w)aG  Bin IDs containing the left and right ends of a genomic region

        Parameters
        ----------
        region : str or tuple
            Genomic range

        Returns
        -------
        2-tuple of ints

        Examples
        --------
        >>> c.extent('chr3')  # doctest: +SKIP
        (1311, 2131)

        N	r   r%   r&   r   r   r<   r   r7   rW   r_   s       r,   extentzCooler.extent   rb   rc   c                    t        | j                  fi | j                  5 }|| j                     }t	        |      cddd       S # 1 sw Y   yxY w)zUFile information and metadata

        Returns
        -------
        dict

        N)r   r%   r&   r   r=   )r)   r+   rA   s      r,   r=   zCooler.info   sD     tzz3T]]3 	rTYY-C9	 	 	s   AAc                (    | j                   d   fdz  S )Nnbins   rV   rS   s    r,   shapezCooler.shape   s    

7#%))rQ   c                H      fd}t        d|d j                  d         S )z[Chromosome table selector

        Returns
        -------
        Table selector

        c                    t        j                  fi j                  5 }|j                     }t	        |||| fi cd d d        S # 1 sw Y   y xY wrG   )r   r%   r&   r   r3   fieldslohir+   rA   r*   r)   s        r,   _slicezCooler.chroms.<locals>._slice   sO    4::77 =2mc2r6<V<= = =   A

ANnchromsr
   r>   )r)   r*   rr   s   `` r,   r3   zCooler.chroms   s$    	=
 tVT4::i3HIIrQ   c                R      fd} fd}t        d|| j                  d         S )zTBin table selector

        Returns
        -------
        Table selector

        c                    t        j                  fi j                  5 }|j                     }t	        |||| fi cd d d        S # 1 sw Y   y xY wrG   )r   r%   r&   r   binsrn   s        r,   rr   zCooler.bins.<locals>._slice  sO    4::77 ;2mCR:6:; ; ;rs   c           	         t        j                  fi j                  5 }|j                     }t	        |j
                  t        | j                        j                        cd d d        S # 1 sw Y   y xY wrG   re   )r`   r+   rA   r)   s      r,   _fetchzCooler.bins.<locals>._fetch	  se    4::77 2m'NN )9)9:LL	  s   AA11A:Nri   ru   )r)   r*   rr   rz   s   ``  r,   rx   zCooler.bins   s)    	;
	 tVVTZZ5HIIrQ   c                V      fd} fd}t        d|| j                  d         S )a  Pixel table selector

        Parameters
        ----------
        join : bool, optional
            Whether to expand bin ID columns into chrom, start, and end
            columns. Default is ``False``.

        Returns
        -------
        Table selector

        c                    t        j                  fi j                  5 }|j                     }t	        |||| fi cd d d        S # 1 sw Y   y xY wrG   )r   r%   r&   r   pixels)ro   rp   rq   r+   rA   joinr*   r)   s        r,   rr   zCooler.pixels.<locals>._slice$  sU    4::77 C2mc2r64B6BC C Cs   AAc           	     4   t        j                  fi j                  5 }|j                     }t	        |j
                  t        | j                        j                        \  }}|d   d   |   }|d   d   |   }||fcd d d        S # 1 sw Y   y xY w)Nindexesbin1_offsetre   )r`   r+   rA   i0i1rp   rq   r)   s          r,   rz   zCooler.pixels.<locals>._fetch)  s    4::77 
2m)NN )9)9:LL	B ^M226^M2262v
 
 
s   A"BBNnnzru   )r)   r~   r*   rr   rz   s   ```  r,   r}   zCooler.pixels  s*    	C
	 tVVTZZ5FGGrQ   c	                     t         v rd fd}	d fd	}
t        ||	|
 j                  d   fdz        S )a  Contact matrix selector

        Parameters
        ----------
        field : str, optional
            Which column of the pixel table to fill the matrix with. By
            default, the 'count' column is used.
        balance : bool, optional
            Whether to apply pre-calculated matrix balancing weights to the
            selection. Default is True and uses a column named 'weight'.
            Alternatively, pass the name of the bin table column containing
            the desired balancing weights. Set to False to return untransformed
            counts.
        sparse: bool, optional
            Return a scipy.sparse.coo_matrix instead of a dense 2D numpy array.
        as_pixels: bool, optional
            Return a DataFrame of the corresponding rows from the pixel table
            instead of a rectangular sparse matrix. False by default.
        join : bool, optional
            If requesting pixels, specifies whether to expand the bin ID
            columns into (chrom, start, end). Has no effect when requesting a
            rectangular matrix. Default is True.
        ignore_index : bool, optional
            If requesting pixels, don't populate the index column with the
            pixel IDs to improve performance. Default is True.
        divisive_weights : bool, optional
            Force balancing weights to be interpreted as divisive (True) or
            multiplicative (False). Weights are always assumed to be
            multiplicative by default unless named KR, VC or SQRT_VC, in which
            case they are assumed to be divisive by default.

        Returns
        -------
        Matrix selector

        Notes
        -----
        If ``as_pixels=True``, only data explicitly stored in the pixel table
        will be returned: if the cooler's storage mode is symmetric-upper,
        lower triangular elements will not be generated. If
        ``as_pixels=False``, those missing non-zero elements will
        automatically be filled in.

        Tc                    t        j                  fi j                  5 }|j                     }t	        |||||| 
	j
                        cd d d        S # 1 sw Y   y xY wrG   )r   r%   r&   r   matrixr?   )fieldr   r   j0j1r+   rA   	as_pixelsbalance	chunksizedivisive_weightsignore_indexr~   r)   sparses          r,   rr   zCooler.matrix.<locals>._slicer  st    4::77 2m $''  s   1AA&c                   t        	j                  fi 	j                  5 }|	j                     }|| }t	        | 	j
                        }t	        |	j
                        }t        |	j                  |	j                        \  }}t        |	j                  |	j                        \  }}||||fcd d d        S # 1 sw Y   y xY wrG   )	r   r%   r&   r   r   r7   r   r<   rW   )
r`   region2r+   rA   region1r   r   r   r   r)   s
            r,   rz   zCooler.matrix.<locals>._fetch  s    4::77 &2m?$G&vt/?/?@&w0@0@A)#t~~wUB)#t~~wUB2r2~& & &s   BB;;Cri   rj   rG   )_4DN_DIVISIVE_WEIGHTSr   r>   )r)   r   r   r   r   r~   r   r   r   rr   rz   s   ` ```````  r,   r   zCooler.matrix8  sN    n ++0@0H#	 	(		& ufftzz'7J6Lq6PQQrQ   c                    t        | j                  t              r;t        j                  j                  | j                        }| d| j                   }nt        | j                        }d| dS )Nr   z	<Cooler "z">)r   r%   r   osrI   basenamer   repr)r)   r   	containers      r,   __repr__zCooler.__repr__  sY    djj#&ww''

3H#*Btyyk2ITZZ(I9+R((rQ   rG   )r%   zstr | h5py.Groupr   
str | None)returnNone)rI   r   r   z
np.ndarray)rI   r   r   r8   )r)rC   r   r   
h5py.Group)r   r   )r   
int | None)r   z	pd.Series)r   z	list[str])r`   str | tuple[str, int, int]r   int)r`   r   r   tuple[int, int])r   r8   )r   r   )r   r
   F)r~   boolr   r
   )NTFFFTN逖 )r   r   r   
bool | strr   r   r   r   r~   r   r   r   r   zbool | Noner   r   r   r   )__name__
__module____qualname____doc__r-   r(   rJ   rM   rP   propertyrT   rW   rY   r]   ra   rf   r=   rk   r3   rx   r}   r   r    rQ   r,   r   r       sI   !F,.* 
)
!( A A & &     , ,66 
 
 * *J J4!HJ !"!(,!YRYR YR 	YR
 YR YR YR &YR YR 
YRv)rQ   c                    i }| j                   j                         D ]0  \  }}t        |t              r	 t	        j
                  |      }|||<   2 |S # t        $ r Y w xY w)z
    File and user metadata dict.

    Parameters
    ----------
    h5 : :py:class:`h5py.File` or :py:class:`h5py.Group`
        Open handle to cooler file.

    Returns
    -------
    dict

    )rL   itemsr   r   jsonloadsr#   )r+   dkvs       r,   r=   r=     si     	A  1aJJqM ! H  s   A	AAc                    |Xt        j                  ddg      j                  t        j                  | d   j                                     j	                         }t        | d   |||fi |S )a  
    Table describing the chromosomes/scaffolds/contigs used.
    They appear in the same order they occur in the heatmap.

    Parameters
    ----------
    h5 : :py:class:`h5py.File` or :py:class:`h5py.Group`
        Open handle to cooler file.
    lo, hi : int, optional
        Range of rows to select from the table.
    fields : sequence of str, optional
        Subset of columns to select from table.

    Returns
    -------
    :py:class:`DataFrame`

    r'   r/   r3   )pdIndexappendkeysdrop_duplicatesr   )r+   rp   rq   ro   r*   s        r,   r3   r3     sc    2 ~HHfh'(VBHHR\..012_ 	
 r(|RV6v66rQ   c                4   |Xt        j                  g d      j                  t        j                  | d   j                                     j	                         }t        | d   |||fi |}d|v r|j                  dd      }t        |t              r|}n|d   }t        |j                        rh|rft        | d      }t         j                  j                  ||d      }t        |t              r"t        j                  ||j                        }|S ||d<   |S )	a  
    Table describing the genomic bins that make up the axes of the heatmap.

    Parameters
    ----------
    h5 : :py:class:`h5py.File` or :py:class:`h5py.Group`
        Open handle to cooler file.
    lo, hi : int, optional
        Range of rows to select from the table.
    fields : sequence of str, optional
        Subset of columns to select from table.

    Returns
    -------
    :py:class:`DataFrame`

    chromstartendrx   r   convert_enumTr'   )ro   )ordered)r   r   r   r   r   r   r   r   r   dtyper3   Categorical
from_codesSeriesr\   )	r+   rp   rq   ro   r*   outr   	chrom_colr]   s	            r,   rx   rx     s    0 ~HH./VBHHRZ__./0_ 	 bj"b&
3F
3C &zz.$7fc"IGIIOO,62J11)ZQU1VI&#&ii	3995 J  )GJrQ   c                &   |Xt        j                  ddg      j                  t        j                  | d   j                                     j	                         }t        | d   |||fi |}|r"t        | d   ddg dfi |}t        ||d	      }|S )
aG  
    Table describing the nonzero upper triangular pixels of the Hi-C contact
    heatmap.

    Parameters
    ----------
    h5 : :py:class:`h5py.File` or :py:class:`h5py.Group`
        Open handle to cooler file.
    lo, hi : int, optional
        Range of rows to select from the table.
    fields : sequence of str, optional
        Subset of columns to select from table.
    join : bool, optional
        Whether or not to expand bin ID columns to their full bin description
        (chrom, start, end). Default is True.

    Returns
    -------
    :py:class:`DataFrame`

    Nbin1_idbin2_idr}   rx   r   r   Treplace)r   r   r   r   r   r   r   )r+   rp   rq   ro   r~   r*   dfrx   s           r,   r}   r}     s    : ~HHi+,VBHHR\..012_ 	 
R\2r6	4V	4B2f:q$(ALVLb$-IrQ   c                   | j                   }t        |t              rd }nd }g }d|v r| d   j                         j	                  t
        j                  dd      }t        |      dk(  rdx}}n=t        |      t        |       kD  r!|j                         |j                         }}nd\  }} ||||      }	|j                  |	j                  ||	j                  d   z
     j                  d	 
      j                  d             d|v r| d   j                         j	                  t
        j                  dd      }
t        |
      dk(  rdx}}n=t        |      t        |       kD  r!|
j                         |
j                         }}nd\  }} ||||      }|j                  |j                  |
|j                  d   z
     j                  d 
      j                  d             |r'dD cg c]	  }||v s| }}| j                  |d      } t!        j"                  g || j                  d      d      }| j                  |_        |S c c}w )a  
    Add bin annotations to a data frame of pixels.

    This is done by performing a relational "join" against the bin IDs of a
    table that describes properties of the genomic bins. New columns will be
    appended on the left of the output data frame.

    .. versionchanged:: 0.8.0
       The default value of ``replace`` changed to False.

    Parameters
    ----------
    pixels : :py:class:`DataFrame`
        A data frame containing columns named ``bin1_id`` and/or ``bin2_id``.
        If columns ``bin1_id`` and ``bin2_id`` are both present in ``pixels``,
        the adjoined columns will be suffixed with '1' and '2' accordingly.
    bins : :py:class:`DataFrame` or DataFrame selector
        Data structure that contains a full description of the genomic bins of
        the contact matrix, where the index corresponds to bin IDs.
    replace : bool, optional
        Remove the original ``bin1_id`` and ``bin2_id`` columns from the
        output. Default is False.

    Returns
    -------
    :py:class:`DataFrame`
    c                    | |||dz    S d  S )Nr   r   )selbegr   s      r,   
_loc_slicezannotate.<locals>._loc_slice_  s    sS1WBBTBBrQ   c                     | j                   || S rG   )loc)r   r   r   s      r,   r   zannotate.<locals>._loc_slicee  s    66#c?"rQ   r   Fsafe)copycastingr   )r   Nc                    | dz   S )N1r   xs    r,   <lambda>zannotate.<locals>.<lambda>z  
    a#g rQ   )columnsT)dropr   c                    | dz   S )N2r   r   s    r,   r   zannotate.<locals>.<lambda>  r   rQ   )r   r   r   )axis)r   r   r
   to_numpyr4   npint64r;   minmaxr   ilocr\   renamereset_indexr   r   concat)r}   rx   r   r   r   annsbin1bminbmaxann1bin2ann2colcols_to_dropr   s                  r,   r   r   <  s    < nnG $(	C	# D Gi ))+22288%QW2Xt9>OD4YV$TXXZ$D JD$$d+IIdTZZ]*+V-V.[d[#	
 Gi ))+22288%QW2Xt9>OD4YV$TXXZ$D JD$$d+IIdTZZ]*+V-V.[d[#	
 '=PPP\2 )):d:F..D.9:
CCCIJ Qs   ,	I6Ic                J   |d}t        |t              r|}n|rd}|r| d   vrt        d| ddz   dz         t        | d	   | d
   dd       }|rt	        ||||||f||
       }|j                         }|rit        |       j                         g   }t        ||d      }|r"d||dz      z  ||dz   <   d||dz      z  ||dz   <   ||dz      ||dz      z  ||   z  |d<   |	r,t        |       j                         g d   }t        ||d      }|S |r|rt        ||||||f|      }nt	        ||||||f|      }|j                         }|rZ| d      }||| }||f||fk(  r|n||| }|r
d|z  }d|z  }||j                     ||j                     z  |j                  z  |_        |S |rt        ||||||f|      }nt	        ||||||f|      }|j                         }|rB| d      }||| }||f||fk(  r|n||| }|r
d|z  }d|z  }|t        j                   ||      z  }|S )a  
    Two-dimensional range query on the Hi-C contact heatmap.
    Depending on the options, returns either a 2D NumPy array, a rectangular
    sparse ``coo_matrix``, or a data frame of pixels.

    Parameters
    ----------
    h5 : :py:class:`h5py.File` or :py:class:`h5py.Group`
        Open handle to cooler file.
    i0, i1 : int, optional
        Bin range along the 0th (row) axis of the heatmap.
    j0, j1 : int, optional
        Bin range along the 1st (col) axis of the heatmap.
    field : str, optional
        Which column of the pixel table to fill the matrix with. By default,
        the 'count' column is used.
    balance : bool, optional
        Whether to apply pre-calculated matrix balancing weights to the
        selection. Default is True and uses a column named 'weight'.
        Alternatively, pass the name of the bin table column containing the
        desired balancing weights. Set to False to return untransformed counts.
    sparse: bool, optional
        Return a scipy.sparse.coo_matrix instead of a dense 2D numpy array.
    as_pixels: bool, optional
        Return a DataFrame of the corresponding rows from the pixel table
        instead of a rectangular sparse matrix. False by default.
    join : bool, optional
        If requesting pixels, specifies whether to expand the bin ID columns
        into (chrom, start, end). Has no effect when requesting a rectangular
        matrix. Default is True.
    ignore_index : bool, optional
        If requesting pixels, don't populate the index column with the pixel
        IDs to improve performance. Default is True.

    Returns
    -------
    ndarray, coo_matrix or DataFrame

    Notes
    -----
    If ``as_pixels=True``, only data explicitly stored in the pixel table
    will be returned: if the cooler's storage mode is symmetric-upper,
    lower triangular elements will not be generated. If ``as_pixels=False``,
    those missing non-zero elements will automatically be filled in.

    Ncountweightrx   zNo column 'bins/'z(found. Use ``cooler.balance_cooler`` to z1calculate balancing weights or set balance=False.r}   zindexes/bin1_offset)return_indexFr   r   r   r   balancedr   T)r   r   r#   r   r   to_framer   rx   r   r	   to_sparse_matrixrowr   datato_arrayr   outer)r+   r   r   r   r   r   r   r   r   r~   r   r   r   
fill_lowerr'   readerenginer   weightsdf2rx   matbias1bias2arrs                            r,   r   r     s   | }'3	4r&z)tfA&89AB
 	
 r(|R(=%>q%ABF $EBB+YEU
 __Rjoo'/G2w6C"#c$*o"5D3J"#c$*o"5D3J _s4#:>UKBzN":??$%>?D"dD1B		*652r2r:JIVF'BB7GSF%%'j&GBrNE "X"b1Ewr"~EE	E	SWW~cgg6ACH
 *652r2r:JIVF'BB7GSFooj&GBrNE "X"b1Ewr"~EE	E	..C
rQ   )r+   r   r   r8   )r   NN)
r+   r   rp   r   rq   r   ro   list[str] | Noner   pd.DataFrame)r   NNT)r+   r   rp   r   rq   r   ro   r
  r~   r   r   r  r   )r}   r  rx   zpd.DataFrame | RangeSelector1Dr   r   r   r  )	NTFFTTFr   T)r+   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   r   r   r   r  r   r   z&np.ndarray | coo_matrix | pd.DataFrame)'
__future__r   r   r    numpyr   pandasr   
simplejsonr   pandas.api.typesr   scipy.sparser   corer   r   r	   r
   r   r   r   r   fileopsr   utilr   r   r   r   __all__r   r   r=   r3   rx   r}   r   r   r   rQ   r,   <module>r     s   " 	     - #	 	 	 " I IZ
  0 y) y)x6 #	777 	7 	7 7H #	555 	5 	5 5t #*** 	* 	*
 * *\ QVZZ >ZIMZZF "GGG 	G 		G
 	G G G G G G G G G G ,GrQ   