cooler icon indicating copy to clipboard operation
cooler copied to clipboard

iced matrix to cool

Open Nuturetree opened this issue 2 years ago • 1 comments

Hi author: When i run cooltools to identify the A/B compartment, I get an error message that 'Unable to open object (component not found)'. I guess this is input file err. I using the HiCExplorer convert iced matrix produced by HiC-Pro. I want to using cooler to convert the iced matrix. But I not find the way. Can you tell me the order how to using the cooler to convert iced matrix? Best Nuturetree

Nuturetree avatar May 25 '22 03:05 Nuturetree

Hi Nurturetree,

You are right that the error message suggests there is something wrong with the input file. Something might have gone wrong with the HiCExplorer conversion. You might want to check if the file is truncated/too small, which might mean that something was interrupted when the conversion was run.

In any case, you can create cooler files directly from the two-file HiCPro output (bin file + matrix file) using cooler load -f coo. Assuming the matrix file is in "upper" format, two options to consider:

  • The HiCPro matrix file uses one-based bin indexes, so pass --one-based
  • If you want to load the iced matrix data (i.e. not integer counts) then also specify --count-as-float.
cooler load -f coo --one-based --count-as-float {bin_file} {iced_matrix_file} out.cool

nvictus avatar Jun 08 '22 05:06 nvictus