Entering edit mode
9.3 years ago
Les Ander
▴
110
Hi
I have 2 bed files.
File1.bed
chr1 1 100 0.5
chr1 900 1000 1.5
chr1 1100 1105 0.5
File2.bed
chr1 1 400
chr1 401 800
chr1 801 1200
I want to determine the frequency of events in File1.bed
in each of the intervals in File2.bed
So for the above input files, the output would be
chr1 1 400 1
chr1 401 800 0
chr1 801 1200 2
Any suggestions?
Also, what if in addition to counting the number of features in the window, I also want to compute their average?
Thank you
Hi Les - you are welcome! hope it helped. do you understand how it works?
VL