Actually, my output would be:
$chr $begin $end $id $average
But I just wanted to start with calculating.
I would like to calculate the average difference between the 2 columns (5 and 6) for the same id.
So for line 3,4,5 I would like to calculate the average difference between column 5 and 6.
And for the lines for which only one line has that id, like line 1 I just want to calculate the difference between column 5 and 6, since there is no average to calculate.
I only want to output the lines that have a average difference > 0.2