Is there a quick and easy method for excluding intervals from a bed file that contain any kind of repetitive elements? Thanks.
Given that you have a file with the repeats in BED format, you may use BEDtools intersect with the -v option:
bedtools intersect -v -a your.bed -b repeat.bed > your_without_repeats.bed
Yes I was thinking of doing it this way, one weird thing though is if I do:
Lets say I get 300 out of an original 1000 for:
However when I do the following to get a file of those intervals that overlap with repeats:
bedtools intersect -a your.bed -b repeat.bed > your_with_repeats.bed
I don't get exactly 700, but another number?
The reason for this is that the second command outputs parts of an -a that partly overlap b. In that case the non-overlapping part of the interval is outputted. If you use -wa option, you should get 700.