Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hic2cool convert error #41

Open
Captaincapture opened this issue Feb 8, 2020 · 2 comments
Open

Hic2cool convert error #41

Captaincapture opened this issue Feb 8, 2020 · 2 comments

Comments

@Captaincapture
Copy link

Captaincapture commented Feb 8, 2020

Hi,
i want to convert my matrice in .hic to .cool but i have always this problem :

hic2cool -v
hic2cool 0.7.3
hic2cool convert Pvam_2.0.hic Pvam_2.0.cool
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/hic2cool", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.7/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 "/Library/Frameworks/Python.framework/Versions/3.7/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 "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hic2cool/hic2cool_utils.py", line 115, in read_footer
    nBytes = struct.unpack(b'<i', f.read(4))[0]
struct.error: unpack requires a buffer of 4 bytes
@pkerpedjiev
Copy link
Collaborator

I got that same error a little while ago. It turned out the .hic file I was trying to convert hadn't downloaded completely and was corrupt. Not sure if there's an integrity check that can be done first but I would recommend making sure that the hic file is valid and complete.

@SooLee
Copy link
Member

SooLee commented Feb 8, 2020

Thanks, @pkerpedjiev! Yes, I think the hic file is likely truncated since it doesn't seem to have a footer (can't retrieve the first 4 bytes of a footer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants