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

hicpro2higlass error interchromosomal matrices #666

Open
ToruOkadaOi opened this issue Dec 26, 2024 · 0 comments
Open

hicpro2higlass error interchromosomal matrices #666

ToruOkadaOi opened this issue Dec 26, 2024 · 0 comments

Comments

@ToruOkadaOi
Copy link

ToruOkadaOi commented Dec 26, 2024

Hi,

I have used build_matrix to create interchromosomal matrices, however when I pass it to the hicpro2higlass.sh utility script, I am getting this error -

(base) aman@unicorn:~/HiC-Pro-3.1.0/scripts/src$ /mnt/storage3/aman/HiC-Pro-master/bin/utils/hicpro2higlass.sh -i /mnt/storage3/aman/20000/chr2_chr5.matrix -r 20000 -c /mnt/storage3/aman/lat_chrom.sizes -o /mnt/storage3/aman/20000/ -t /mnt/storage3/aman
MATRIX input file detected ...
Cooler version 0.10.2 detected ...

Generating .cool files ...
INFO:cooler.cli.load:fields: {'bin1_id': 0, 'bin2_id': 1, 'count': 2}
INFO:cooler.cli.load:dtypes: {'bin1_id': <class 'int'>, 'bin2_id': <class 'int'>, 'count': <class 'numpy.int32'>}
INFO:cooler.cli.load:symmetric-upper: True
INFO:cooler.create:Writing chunk 0: /mnt/storage3/aman/_tmp854199/tmpzeg0s87y.multi.cool::0
INFO:cooler.create:Creating cooler at "/mnt/storage3/aman/_tmp854199/tmpzeg0s87y.multi.cool::/0"
INFO:cooler.create:Writing chroms
INFO:cooler.create:Writing bins
INFO:cooler.create:Writing pixels
Traceback (most recent call last):
File "/home/aman/.local/bin/cooler", line 8, in
sys.exit(cli())
File "/home/aman/.local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/aman/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/aman/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/aman/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/aman/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/aman/.local/lib/python3.10/site-packages/cooler/cli/load.py", line 345, in load
create_from_unordered(
File "/home/aman/.local/lib/python3.10/site-packages/cooler/create/_create.py", line 767, in create_from_unordered
create(uri, bins, chunk, columns=columns, dtypes=dtypes, mode="a", **kwargs)
File "/home/aman/.local/lib/python3.10/site-packages/cooler/create/_create.py", line 681, in create
nnz, ncontacts = write_pixels(
File "/home/aman/.local/lib/python3.10/site-packages/cooler/create/_create.py", line 235, in write_pixels
for i, chunk in enumerate(iterable):
File "/home/aman/.local/lib/python3.10/site-packages/cooler/create/_ingest.py", line 424, in _validate_pixels
raise BadInputError(
cooler.create._ingest.BadInputError: Found duplicate pixels:
bin1_id bin2_id count
92064 2 1332 1
129448 4 1968 1
627219 7 10723 1
307530 8 5132 1
400903 10 6654 1

Error: /mnt/storage3/aman/HiC-Pro-master/bin/utils/hicpro2higlass.sh - line 234 - exit status of last command: 1. Exit
Error: exit status detected. Exit.
Cleaning temporary folders ...

I have a 45 interchr. matrices like this -

SCR-20241226-qhaf

This is the general command I am following-

/mnt/storage3/aman/HiC-Pro-master/scripts/build_matrix --binsize 15000 --chrsizes /mnt/storage3/aman/lat_chrom.sizes --ifile /mnt/storage3/aman/hic_results/hic_results/data/data/data.allValidPairs --oprefix chr9_chr9 --chrA 9 --chrB 9 --detail-progress

But I could get the .mcool file using the hicpro2higlass script for intra chromosomal matrices.

How is it that the utility script is working for the full contact matrix produced by hic pro pipeline and the intra chrom. ones but not the inter ones?

Could anyone please let me know why this happens and how to fix it?

Thanks!

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

1 participant