I have a list of 2D features, more specifically chromatin loops, in a bedpe file of the format:
chr1 pos1 pos2 chr2 pos1 pos2
and I would like to add an additional column to this file with information about the mean interaction frequency of each of the regions using a interaction matrix file ( given by either a .hic or .cool or .h5, or spare matrix file) as my reference. The resulting file would look something like this:
chr1 1200 1400 chr1 1800 1900 score1
chr1 4500 4600 chr1 5000 5100 score2
I am not familiar with matrix manipulation.. I'm sure that there may be a way of doing this using R, but I was wondering if there is a established tool out there that people already use for this purpose... I have searched for some time but have not been able to find something that can help me with this task so any help is very much appreciated. Thanks!