Lieberman-Aiden et al. (2009) demonstrated that open and closed chromatin domains throughout the genome occupy different spatial compartments in the nucleus, defined as A (activate) and B (inactive) compartments.
hicPCA computes two eigenvector files based on the input matrix for an A / B compartment analysis following the computation steps detailed by Lieberman-Aiden et al. (2009): the transformation of the contact matrix into an observed vs. expected matrix and consecutively a Pearson correlation matrix shows a plaid pattern. These plaid pattern are called A and B. Applying a PCA on the Pearson correlation matrix gives the eigenvectors and Lieberman-Aiden shows that the values of the eigenvectors correspond to the distribution of genes and with features of open and closed chromatin. In some cases the first principal component corresponds to the two chromosomes arms and the second eigenvector to the plaid pattern. Therefore always the first two principal components needs to be returned and investigated.
This tool must be used on Hi-C contact matrices with large bins (over 20kb) using hicMergeMatrixBins and corrected with hicCorrectMatrix. Using matrices with a too high resolution (small bins or at restriction enzyme resolution) might take several days to run (even with over 100 CPU) or will fail due to memory limitations.
Two files are outputed by hicPCA, one with the first (pca1) and one with the second (pca2) eigenvector as bigwig or bedgraph. These files can be plotted alongside Hi-C heatmaps, gene density or external datasets such as open chromatin or histone marks enrichment using pyGenomeTracks or hicPlotMatrix.
For example, below you can find a hicPlotMatrix of the Pearson correlation matrix derived from a contact matrix for chromosome 6 in mouse computed with hicTransform (which is part of A/B compartments computation). The optional data track at the bottom shows the first eigenvector for A/B compartment obtained using hicPCA.