ay-lab / mustache

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

list index out of range! #56

Open ccmeth opened 1 year ago

ccmeth commented 1 year ago

Hi developers,

Thanks a lot for developing a very useful tool for loop analysis. However, I met with an error when using the diff.py. The chromosomes I chose for loop differential analysis are 1-22, however, for chr9, one issue appeared. Could you please tell me how to fix such an issue?

image

ay-lab commented 1 year ago

Must have something to do with that non-round number in the last entry, the second column.

ccmeth commented 1 year ago

I directly downloaded the .hic files from Rao et al., 2014 Cell with GSE63525.

Must have something to do with that non-round number in the last entry, the second column.

ay-lab commented 1 year ago

do you know which specific .hic file is throwing this error? It can be related to some chrs in some cell lines with normalization (KR) not converging so bias values are being missing or NaN etc.

ccmeth commented 1 year ago

do you know which specific .hic file is throwing this error? It can be related to some chrs in some cell lines with normalization (KR) not converging so bias values are being missing or NaN etc.

Thanks for your timely reply! The .hic files I used for differential loop analysis are GSE63525_K562_combined.hic and GSE63525_HMEC_combined.hic. The chromosomes that seem to be abnormal are chr9 and chr15 after I checked.

JerryZhaoLab commented 7 months ago

I got this same error message for my own hic files when performing the loop comparison. If I used 10kb resolution, there was no problem. If I used the 5kb resolution, I got this error message of "IndexError: list index out of range" at chromosome 14. Note, in one of our samples, a big piece of DNA was deleted from chromosome 14. Any ideas to solve this problem?

Thanks.

"Traceback (most recent call last): File "/home/jerry/Tools/mustache/mustache/diff_mustache.py", line 910, in main() File "/home/jerry/Tools/mustache/mustache/diff_mustache.py", line 838, in main o = regulator(f1, f2, args.norm_method, CHRM_SIZE, args.outdir, File "/home/jerry/Tools/mustache/mustache/diff_mustache.py", line 612, in regulator x2, y2, v2 = read_hic_file(f2, norm_method, CHRM_SIZE, distance_in_bp, chromosome,chromosome2, res) File "/home/jerry/Tools/mustache/mustache/mustache.py", line 359, in read_hic_file x = np.array(result[0]) // res IndexError: list index out of range "