My data frame looks like this:
NNC_009925.1 NC_009925.1 100.00 5356 0 0 5635975 5641330 1410850 1405495 0.0 9891
NC_009925.1 NC_009925.1 100.00 5356 0 0 1405495 1410890 5641330 5635975 0.0 9850
NC_009925.1 NC_009925.1 99.57 2788 12 0 3711607 3714394 1346122 1343335 0.0 5083
NC_009925.1 NC_009925.1 99.57 2788 12 0 1343335 1346122 3714394 3711659 0.0 5037
The 7th and 8th columns represent a range (Range1), while the 9th and 10th columns represent a second range (Range2). I'd like to remove all instances in the data frame where Range1 overlaps with ANY row of Range2. The criteria for which to retain would be based on the highest value in the rightmost column. So the output would look like this:
NC_009925.1 NC_009925.1 100.00 5356 0 0 5635975 5641330 1410850 1405495 0.0 9891
NC_009925.1 NC_009925.1 99.57 2788 12 0 3711607 3714394 1346122 1343335 0.0 5083