4dn-dcic / hic2cool

Lightweight converter between hic and cool contact matrices.
MIT License
63 stars 7 forks source link

hic2cool convert error with Juicer hic file #38

Closed wyim-pgl closed 3 years ago

wyim-pgl commented 5 years ago

Hi! I am working with Juicer hic file to convert cool format for matrix analysis. During converting, I have an error "buffer size must be a multiple of element size". Do you have any recommendation to solve this? Thanks.

hic2cool -v
hic2cool 0.7.3
$ hic2cool  convert  inter.hic  test.cool
Traceback (most recent call last):
  File "/home/wyim/miniconda3/envs/hic/bin/hic2cool", line 12, in <module>
    sys.exit(main())
  File "/home/wyim/miniconda3/envs/hic/lib/python3.7/site-packages/hic2cool/__main__.py", line 80, in main
    hic2cool_convert(args.infile, args.outfile, args.resolution, args.warnings, args.silent)
  File "/home/wyim/miniconda3/envs/hic/lib/python3.7/site-packages/hic2cool/hic2cool_utils.py", line 830, in hic2cool_convert
    pair_footer_info, expected, factors, norm_info = read_footer(req, buf, masteridx)
  File "/home/wyim/miniconda3/envs/hic/lib/python3.7/site-packages/hic2cool/hic2cool_utils.py", line 145, in read_footer
    offset=f.tell())
ValueError: buffer size must be a multiple of element size
carlvitzthum commented 5 years ago

Hi @plantgenomicslab

Thanks for raising your issue. It seems this error occurs while reading the footer from the hic file. Could you send me inter.hic so I can try to reproduce it?

Carl

wyim-pgl commented 3 years ago

Hi It was my mistake and it worked now. Sorry for late.

Won

usernicai commented 6 months ago

@wyim-pgl Hello, I encountered the same problem, I used HIC-pro to produce allvalidpair file, after using juicer_tool to convert to hic file, whether using hic2cool or hicexplorer have this problem, how do you solve it