I would like to compute the average score across multiple bed files (say from ChIP-seq) for a specific genomic region.
Let's say I have the following three bed files and I wish to compute the average score for chr1:10-20
a.bed
chr start end score
chr1 10 20 3
b.bed
chr start end score
chr1 12 14 3
c.bed
chr start end score
chr1 16 18 3
The desired output that I would like is the following:
chr start end mean.score
chr1 10 11 1
chr1 12 14 2
chr1 15 15 1
chr1 16 18 2
chr1 19 20 1
What is the computationally most efficient way of doing this?
It is not very clear what do you average on (the number of bases, peaks, files)? It seems to me as count and not mean, can you elaborate more how does chr1:10-11 gets score of 1 as average and how chr1:12-14 gets 2?
Hello Andy Lee!
It appears that your post has been cross-posted to another site: https://support.bioconductor.org/p/111405/
This is typically not recommended as it runs the risk of annoying people in both communities.