".hic" is a binary format defined by Aiden lab. You can use a tool "juicer" (https://github.com/aidenlab/juicer/wiki/Juicer-Tools-Quick-Start) to extract text matrices. For example, execute the following command: java -jar juicer_tools.1.8.9_jcuda.0.8.jar dump observed NONE https://hicfiles.s3.amazonaws.com/hiseq/gm12878/in-situ/primary.hic 1 1 BP 10000 chr1_10kb.txt You will get the raw text Hi-C matrix (chr1_10kb.txt) of chromosome 1 in GM12878 at 10kb resolution. Part of the file "chr1_10kb.txt" looks like the following: 40000 50000 1.0 50000 50000 48.0 40000 60000 1.0 50000 60000 24.0 60000 60000 65.0 If you want to get a n-by-n contact matrix, you also need to determine the (i, j) indexes, like 40000/10000 = 4, and 50000/10000 = 5, which means that the first line "40000 50000 1.0" corresponds to the entry with value equal to 1 and with indexes equal to (4,5) and (5,4) in the n-by-n symmetric matrix. After getting the matrix file (format same as "chr1_10kb.txt"), you can just go to step 4 (just ignore the first three steps) and use the new script (get_HiCNN2_input_fromMat.py) instead of the old one to get the input for HiCNN2 prediction. python get_HiCNN2_input_fromMat.py your_mat_file 102531392 100000 chr15.subMats chr15.index