Creating multi-resolution files (.hic and .mcool)

Converting .cool to .mcool

Interactions from a single-resolution Cooler file (.cool) can be used to generate a multi-resolution Cooler (.mcool) by iterative coarsening using hictk zoomify

user@dev:/tmp$ hictk zoomify data/4DNFIZ1ZVXC8.mcool::/resolutions/1000 out.mcool

[2024-09-26 17:21:21.792] [info]: Running hictk v1.0.0-fbdcb591
[2024-09-26 17:21:21.795] [info]: coarsening cooler at data/4DNFIZ1ZVXC8.mcool::/resolutions/1000 13 times (1000 -> 1000 -> 2000 -> 5000 -> 10000 -> 20000 -> 50000 -> 100000 -> 200000 -> 500000 -> 1000000 -> 2000000 -> 5000000 -> 10000000)
[2024-09-26 17:21:21.795] [info]: copying 1000 resolution from data/4DNFIZ1ZVXC8.mcool::/resolutions/1000
[2024-09-26 17:21:21.959] [info]: generating 2000 resolution from 1000 (2x)
[2024-09-26 17:21:22.134] [info]: [1000 -> 2000] processing chr2L:1996000-1998000 at 5747126 pixels/s...
[2024-09-26 17:21:22.355] [info]: [1000 -> 2000] processing chr2L:4932000-4934000 at 4545455 pixels/s...
[2024-09-26 17:21:22.563] [info]: [1000 -> 2000] processing chr2L:7986000-7988000 at 4830918 pixels/s...
 ...
[2024-09-26 17:21:42.886] [info]: generating 2000000 resolution from 1000000 (2x)
[2024-09-26 17:21:42.892] [info]: generating 5000000 resolution from 1000000 (5x)
[2024-09-26 17:21:42.898] [info]: generating 10000000 resolution from 5000000 (2x)
[2024-09-26 17:21:42.902] [info]: DONE! Processed 13 resolution(s) in 21.11s!

# Coarsen a single resolution
user@dev:/tmp$ hictk zoomify data/4DNFIZ1ZVXC8.mcool::/resolutions/1000 out.cool --resolutions 50kbp

[2024-09-26 17:22:22.203] [info]: Running hictk v1.0.0-fbdcb591
[2024-09-26 17:22:22.206] [info]: coarsening cooler at data/4DNFIZ1ZVXC8.mcool::/resolutions/1000 2 times (1000 -> 1000 -> 50000)
[2024-09-26 17:22:22.206] [info]: copying 1000 resolution from data/4DNFIZ1ZVXC8.mcool::/resolutions/1000
[2024-09-26 17:22:22.364] [info]: generating 50000 resolution from 1000 (50x)
[2024-09-26 17:22:23.165] [info]: [1000 -> 50000] processing chr2L:23000000-23050000 at 1253133 pixels/s...
[2024-09-26 17:22:23.939] [info]: [1000 -> 50000] processing chr3L:4600000-4650000 at 1293661 pixels/s...
[2024-09-26 17:22:24.878] [info]: [1000 -> 50000] processing chr3R:32050000-32079331 at 1064963 pixels/s...
[2024-09-26 17:22:25.151] [info]: DONE! Processed 2 resolution(s) in 2.95s!

Converting a single-resolution .hic to a multi-resolution .hic

Interactions from a .hic file (like the one generated by hictk load) can be used to generate a multi-resolution .hic file by iterative coarsening using hictk zoomify. hictk will copy interactions for resolutions that are available in the input file. Interactions at resolutions missing from the input file will be generated by iterative coarsening.

Tips:

For tips and tricks that also apply to hictk zoomify, please refer to the Tips section of the hictk load documentation.