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
233 stars 70 forks source link

hicPCA: whole chromosome is all positive or negative (PC1) #607

Closed YichaoOU closed 4 years ago

YichaoOU commented 4 years ago

Screen Shot 2020-09-27 at 6 57 57 PM

The first two tracks are PC1 values calculated by Homer. The rest tracks are PC1 values calculated by hicPCA in 100kb and 40kb resolution. I'm not worrying about the sign. But it is weird to see the all positive or negative values for PC1 for the whole chromosome. Also tried different parameters.

hicConvertFormat --matrices ./iced/100000/${COL1}_100000_iced.matrix --outFileName ${COL1}.hicexplorer_100kb --inputFormat hicpro --outputFormat h5 --bedFileHicpro ./raw/100000/${COL1}_100000_abs.bed

hicPCA -m ${COL1}.hicexplorer_100kb.h5 -o ${COL1}_100kb_PC1.iced.bw ${COL1}_100kb_PC2.iced.bw --extraTrack xxx.bw

hicPCA --ligation_factor -m ${COL1}.hicexplorer_100kb.h5 -o ${COL1}_100kb_PC1.iced.adjust.bw ${COL1}_100kb_PC2.iced.adjust.bw --extraTrack xxx.bw

hicPCA --method lieberman -m ${COL1}.hicexplorer_100kb.h5 -o ${COL1}_100kb_PC1.iced.lieberman.bw ${COL1}_100kb_PC2.iced.lieberman.bw --extraTrack xxx.bw

I'm not sure where the bug is. hicPCA 3.5.1

joachimwolff commented 4 years ago

The methods how to compute the PCAs are different between the softwares. It might be the case that PC2 or PC3 is the track you are looking for. Please always consider more than just the first PC, this was already stated by Lieberman-Aidens first Hi-C publication from 2009.

YichaoOU commented 4 years ago

Thanks! Do you have any suggestions about how we can merge PC1.bw and PC2.bw at selected chromosome?

LeilyR commented 4 years ago

why do you want to merge them? That does not make so much sense.

YichaoOU commented 4 years ago

just for visualization. Using one track for A/B compartment, instead of two tracks, PC1 and PC2.

joachimwolff commented 4 years ago

In this case where PC1 seems to not have meaningful values, I would actually drop it. However, you can use the overlay option of pyGenomeTracks to visually merge them.

YichaoOU commented 4 years ago

OK, thanks!