# hicCompartmentsPolarization¶

Rearrange the average interaction frequencies using the first PC values to represent the global compartmentalization signal. To our knowledge this has been first introduced and implemented by Wibke Schwarzer et al. 2017 (Nature. 2017 Nov 2; 551(7678): 51–56)

$ hicCompartmentsPolarization –obsexp_matrices obsExpMatrix.h5 –pca pc1.bedgraph -o global_signal.png

```
usage: hicCompartmentsPolarization --obsexp_matrices OBSEXP_MATRICES
[OBSEXP_MATRICES ...] --pca PCA
--outputFileName OUTPUTFILENAME
[--quantile QUANTILE] [--outliers OUTLIERS]
[--outputMatrix OUTPUTMATRIX] [--help]
[--version]
```

## Required arguments¶

`--obsexp_matrices, -m`HiCExplorer matrices in h5/cool format.

`--pca`a PCA vector as a bedgraph file with no header. In case of several matrices with different conditions, ie. controltreatment, the PCA of control can be used. Note that only one PCA can be provided.

`--outputFileName, -o`Plot to represent the polarization of A/B compartments.

## Optional arguments¶

`--quantile, -q`number of quantiles

Default: 30

`--outliers`precentage of outlier to remove

Default: 0

`--outputMatrix`output .npz file includes all the generated matrices

`--version`show program’s version number and exit

- Applying PCA to compute the global compartmentalization signal

To our knowledge this method has been first introduced by Wibke Schwarzer et al. 2017 (Nature. 2017 Nov 2; 551(7678): 51–56). In this method, a global (genome-wide) strength for compartmentalization is computed as (AA + BB) / (AB + BA) after rearranging the bins of obs/exp based on their corresponding pc1 values. For this purpose, first pc1 values are reordered incrementally, then the same order of bins is used to rearrange the bins in obs/exp matrix.

```
$ hicCompartmentsPolarization --obsexp_matrices obsExpMatrix.h5 --pca pc1.bedgraph
-o global_signal.png
```