Dear community,
I am interested in calculate the distances of a specific position list to the peaks called before.
Lets say I have some chip seq peaks (bed files, with chr, start and end) and I have other list with different position in which I am interested (again bed file, chr, start and end).
First I want to see if there is any overlapping, that is something easy to do with bedtools intersect
, but if the position is not in the peak, I would like to calculate the distance from my position to the peak (beginning and end), choosing the smallest one.
I don't know if there is any tool that can help me for doing that or if is something that I should figure out. In both cases, I really appreciate any advice :)
Thank you very much
Thank you, is exactly what I need!