GENOVA icon indicating copy to clipboard operation
GENOVA copied to clipboard

Balancing for mcool files while loading contacts?

Open MaybeBio opened this issue 1 year ago • 6 comments

Hi, I recently worked on multiple cool files between GENOVA and HiCExplorer. I first converted the matrix file from raw hic-pro format to cool file without Normalizing, Then i use HiCExplorer's hicNormalize and hicCorrectMatrix (--correctionMethod KR),

what i did using hicNormalize is this: image

image

then what i did using hicCorrectMatrix (--correctionMethod KR) is this: image

so i now have mcool files normalized using KR amongst multiple samples,what i confused is how do i set some of these parameters image 1,do i need to set scale_bp=NULL which was mentioned in #356, 2,do i need to set balancing=FALSE cause i see description " balancing | TRUE (default) will perform matrix balancing for .cooler and KR for.hic." but i have already done KR normalizing to mcool files ? Or are there any other Settings I need to be aware of

Thanks a lot, Best

MaybeBio avatar Sep 11 '24 05:09 MaybeBio

Hi,

I am having the same concern as I am loading my .mcool files that have already been normalized externally.

Because we are not using KR normalization for our data, I would like to import them with our custom normalization and I am wondering wether the balancing = FALSE will do that or load the raw data without the weight information?

If it loads the raw data, is there any option that would allow specifying the weight vector please?

Thanks a lot, Best,

Sarah Manoury-Battais

sarahmnry avatar Oct 31 '24 10:10 sarahmnry

If balancing = TRUE, it will use the weight column in the .(m)cool file. If 'KR' is present, a weight column will be constructed from the inverse of 'KR". If you have a custom normalisation, make sure there is a 'weight' column and not a 'KR' column in order for balancing = TRUE to use the weight column.

teunbrand avatar Oct 31 '24 10:10 teunbrand

Thank you so much for your reactivity and for your help! When setting balancing=FALSE, I realized the matrix had decimal values, doesn't that mean that it already took the balanced data?

Thank you

sarahmnry avatar Oct 31 '24 10:10 sarahmnry

It might just be the scale_bp setting that might make your integers into decimal values when balancing = FALSE.

teunbrand avatar Oct 31 '24 10:10 teunbrand

That makes sense, thank you! And congratulations for this tools, it's really nice to work with.

Best

sarahmnry avatar Oct 31 '24 10:10 sarahmnry

If balancing = TRUE, it will use the weight column in the .(m)cool file. If 'KR' is present, a weight column will be constructed from the inverse of 'KR". If you have a custom normalisation, make sure there is a 'weight' column and not a 'KR' column in order for balancing = TRUE to use the weight column.

Sorry for the late reply, thank you very much for your answer, so do I need to use scale_bp parameter again, if I have already used hicnormalize --smallest, norm then scale/sum the matric to 1e9 ?

MaybeBio avatar Apr 12 '25 13:04 MaybeBio