Entering edit mode
5.1 years ago
Ashley
▴
90
I want to merge intervals using weighted means instead of sum or average. Thanks for taking your time to read this file.
My input data: data format: chrFileA startFileA endFile1 chrFile2 startFile2 endFile2 value TheLengthOfOverlap
chr1 12000 13000 chr1 12984 13164 3 16
chr1 13000 14000 chr1 12984 13164 3 164
My output data: data format: chrFileA startFileA WeightedMeanValues
chr1 12000 13000 16/(13164-12984)*3
chr1 13000 14000 164/(13164-12984)*3
Any help would be great grateful.