deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
231 stars 70 forks source link

What are the differences of the pearson matrix generated by hicPCA and hicTransform? #795

Open qiuyixmm opened 2 years ago

qiuyixmm commented 2 years ago

Hello, For A / B compartments analysis, I plot the A / B compartments based on the pearson matrix. The pearson matrix was generated by two tools (hicPCA and hicTransform) separately. I found that visualizaion of A / B compartments is a little different.

a.) the commandlines for hicPCA: hicPCA -m Mus.100Kb.corrected.h5 \ --numberOfEigenvectors 2 --method lieberman \ --outputFileName Mus.100Kb.pca1.bw Mus.100Kb.pca2.bw --format bigwig \ --pearsonMatrix Mus.100Kb.hicPCA.pearson.h5 \ --obsexpMatrix Mus.100Kb.hicPCA.obsexp.h5

b.) and then plot A / B compartments based on the pearson matrix generated by hicPCA : hicPlotMatrix -m Mus.100Kb.hicPCA.pearson.h5 \ --outFileName Mus.100Kb.hicPCA.png --perChr --bigwig Mus.100Kb.pca1.bw

the checkerboard pattern of A / B compartments is abvious (using one chromosome as the case): hicPCA

c.) the commandlines for hicTransform: hicTransform -m Mus.100Kb.corrected.h5 --perChromosome \ --outFileName Mus.100Kb.hicTransform.pearson.h5 --method pearson

Of note, accroding to #580, i add the prameter --perChromosome but no changes for final plot. In addition, --method all in this document (https://hicexplorer.readthedocs.io/en/latest/content/example_usage.html#a-b-compartment-analysis) is not valid options in my used version of hicexplorer (v3.6). So I use --method pearson instead.

d.) and then plot A / B compartments based on the pearson matrix generated by hicTransform: hicPlotMatrix -m Mus.100Kb.hicTransform.pearson.h5 \ --outFileName Mus.100Kb.hicTransform.png --perChr --bigwig Mus.100Kb.pca1.bw

However, the checkerboard pattern of A / B compartments is not very abvious compared the plot above (using the same chromosome as the case): hicTransform

e.) And the matrix files Mus.100Kb.hicPCA.pearson.h5 and Mus.100Kb.hicTransform.pearson.h5 are not the same files. According to my understanding, the peason matix was claculated by hicPCA and hicTransform (--perChromosome) with equivalent method (https://github.com/deeptools/HiCExplorer/issues/580) per chromosom. If so, why the plots of A / B compartments are a little different? Which pearson matrix is recommended for A / B compartments analysis?