Hello everybody, I should be grateful if you would kindly help me de fix my problem. I have a table like that :
Chromosome start end info1 info2
chr01 1 100 15 35
chr01 150 300 15 39
chr01 299 750 16 39
I would like to merge the intervals that overlap ( line 2 and 3) and those that are closest (line 1 and 2) in addition to perform some operation basing in the other column ! for example I would like to merge the tree line above into one interval (chr1 1-750), sum basing on the info1 (15+15+16) and finally did the mean basing on the info line to (35+39+39)/3 the output I'd like will be as this :
chr1 1-750 46 37.66
I know that Bedtools can merge interval ( galaxy tool ! too )but accept only BED format that contain only 3 coloumn chr start and end !
Thanks in advance for your help !