ay-lab / mustache

Multi-scale Detection of Chromatin Loops from Hi-C and Micro-C Maps using Scale-Space Representation
MIT License
64 stars 11 forks source link

Different output using hic format (v1.2.7) #43

Open PaulaLopezMarti opened 2 years ago

PaulaLopezMarti commented 2 years ago

Hi,

I'm running mustache v1.2.7 and I'm having a similar problem as the one in #26. I'm using the same dataset from 4DN (4DNFIPC7P27B.hic & 4DNFI9FVHJZQ.mcool) with the same options (for the sake of speed, I'm now using only chr18):

python -m mustache -f 4DNFIPC7P27B.hic -r 5kb -ch 18 -v VERBOSE -norm KR -pt 0.01
python -m mustache -f DNFI9FVHJZQ.mcool -r 5kb -ch chr18 -v VERBOSE -norm KR -pt 0.01

When using mustache v1.2.0, I'm getting the same results as mentioned in #26. That is, 836 loops using .mcool file; and 838 loops using .hic file. However, if I use the version 1.2.0 and the same commands, I get a different number of loops if the input is the .hic file: 722 loops (with the .mcool file I obtain the same number of loops as in v1.2.0: 836).

I tried converting the .hic file to .cool using hicConvertFormat from the HiCExplorer tool:

hicConvertFormat -m 4DNFIPC7P27B.hic -o 4DNFIPC7P27B_converted.cool --inputFormat hic --outputFormat cool -r 5000

And then I ran mustache v1.2.7 with the converted matrix (4DNFIPC7P27B_converted_5000.cool):

python -m mustache -f 4DNFIPC7P27B_converted_5000.cool -r 5kb -ch 18 -v VERBOSE -norm KR -pt 0.01

And I got 838 loops (that is, the same number of loops as with v1.2.0 and the .hic file).

So, I wonder if there may be a bug in the analysis of .hic files in this new version of mustache.

Many thanks!

Paula

ay-lab commented 2 years ago

Hi Paula, thanks for pointing out the issue in the new version. I updated the code and it should be fixed now.