
    DUf
                        d dl Z ddlmZ ddlmZ ddlmZ d dlZddlmZ  ej	                     ej
        dd	ed
           ej        dddde           ej        ddde ed          d           ej        ddded           ej        ddd ej        d          d           ej        dded d          d!                                                                                     ZdS )"    N   )api)make_cooler_view)read_viewframe_from_file   )cli	cool_path	COOL_PATH)metavartypenargsz--nprocz-pzPNumber of processes to split the work between.[default: 1, i.e. no process pool])helpdefaultr   z--chunksizez-czFControl the number of pixels handled by each worker process at a time.g    cAT)r   r   r   show_defaultz--outputz-oz?Specify output file name to store the expected in a tsv format.F)r   r   requiredz--viewz	--regionsa  Path to a 3 or 4-column BED file with genomic regions. Trans-expected is calculated on all pairwise combinations of these regions. When region names are not provided (no 4th column), UCSC-style region names are generated. Trans-expected is calculated  for all inter-chromosomal pairs, when view is not specified. Note that '--regions' is the deprecated name of the option. Use '--view' instead.)existsz--clr-weight-namezqUse balancing weight with this name stored in cooler.Provide empty argument to calculate cis-expected on raw dataweightc                 J   t          j        |           }|t          |          }nt          ||d          }t          j                            |||r|nd||          }|r|                    |ddd           dS t          |                    ddd                     dS )	a|  
    Calculate expected Hi-C signal for trans regions of chromosomal interaction map:
    average of interactions in a rectangular block defined by a pair of regions, e.g.
    inter-chromosomal blocks.

    When balancing weights are not applied to the data, there is no
    masking of bad bins performed.

    COOL_PATH : The paths to a .cool file with a balanced Hi-C map.

    NT)check_sorting)view_dfclr_weight_name	chunksizenproc	Fnan)sepindexna_rep)	coolerCoolerr   r   r   expectedexpected_transto_csvprint)	r	   r   r   outputviewr   clrr   results	            Y/var/www/html/software/conda/lib/python3.11/site-packages/cooltools/cli/expected_trans.pyr"   r"      s    B -	
"
"C|"3'' +4DIII\((+:D )  F  Bf$eEBBBBB 	fmmE%m@@AAAAA    )r    r   
lib.commonr   lib.ior   clickr   commandargumentstroptionintPathr"    r*   r)   <module>r6      s          ) ) ) ) ) ) - - - - - -        [s!DDD
)	   	Q	CII   	J	   
Y 
4	 	 	    
C	  *B *B      ED Z*B *B *Br*   