It looks like the matrix is displaced when you use hicMergeMatrixBins from high resolution instead of building the matrix at that resolution.
First, with hicBuildMatrix, I did a 5kb resolution matrix using cool format and then, using hicMergeMatrixBins with -nb 8, I created a 40kb matrix . However, when I did some metanalysis centered on CTCF peaks, the 40kb matrix gave me weird results, but not with the 5kb. When I compare it, I saw that the 40kb matrix was displaced to the left, maybe because some columns were removed when merging the 5kb resolution (everything was uncorrected matrices).
Also, the verified this, I created directly the matrix with hicBuildMatrix with 40kb resolution and the metaplot results were the same as with 5kb (but totally diferent from the merged matrix)
For example, If you plot 1Mb around chr2:20293400-20293821 in hg19 you obtain:
5kb chr2[3859:4259,3859:4259]
40kb with hicMergeMatrixBins chr2[482:532,482:532]
40kb chr2[482:532,482:532]
And also the shape of the matrix is reduced:
5kb (48640, 48640)
40kb merged (5962, 5962)
40kb (6080, 6080)
Finally, because in cool format a column with all zeros is consider as NaN, if you sum two uncorrected matrices but one having this zero column, you are going to lose the information even although the other matrix has data on it,and that would be a bug, no?
Thank you for all, I like a lot your program
Daniel
It looks like the matrix is displaced when you use hicMergeMatrixBins from high resolution instead of building the matrix at that resolution. First, with hicBuildMatrix, I did a 5kb resolution matrix using cool format and then, using hicMergeMatrixBins with -nb 8, I created a 40kb matrix . However, when I did some metanalysis centered on CTCF peaks, the 40kb matrix gave me weird results, but not with the 5kb. When I compare it, I saw that the 40kb matrix was displaced to the left, maybe because some columns were removed when merging the 5kb resolution (everything was uncorrected matrices). Also, the verified this, I created directly the matrix with hicBuildMatrix with 40kb resolution and the metaplot results were the same as with 5kb (but totally diferent from the merged matrix)
For example, If you plot 1Mb around chr2:20293400-20293821 in hg19 you obtain:
5kb chr2[3859:4259,3859:4259]
40kb with hicMergeMatrixBins chr2[482:532,482:532]
40kb chr2[482:532,482:532]
And also the shape of the matrix is reduced:
Finally, because in cool format a column with all zeros is consider as NaN, if you sum two uncorrected matrices but one having this zero column, you are going to lose the information even although the other matrix has data on it,and that would be a bug, no?
Thank you for all, I like a lot your program Daniel