I want to instead of use the -wa option or -wb option in bedtools intersect, i want the union of all regions which have some intersection.
So if my input is like so (first row bed 1 second row bed 2):
ccccc ccccc cc ccccccccc cccc ccccccccccccccccccc
then I want the output to be:
Is there an operation like this?
I can do bedtools intersect -wa and then -wb on the same input and now I have to files only of regions that contain an intersection, and then take their union, but i was wondering if there was something already implemented.