I have a bed file with many fragments, some overlapping, some on their own and some adjacent to each other (book-ended) features.
I know can group overlapping and book-ended features using bedtools like
bedtools cluster -i fragments.bed
However I was wondering if anyone knew of a way of obtaining from the input file only the fragments that contain book-ended adjacent fragments.
Any ideas?
Best regards