Bedtools tutorial
Help 12 / 20
bedtools complement

Find uncovered regions

We often want to know which intervals of the genome are NOT “covered” by intervals in a given feature file. For example, if you have a set of ChIP-seq peaks, you may also want to know which regions of the genome are not bound by the factor you assayed. The complement addresses this task.

How bedtools complement works

As an example, let’s find all of the non-exonic (i.e., intronic or intergenic) regions of the genome. Note, to do this you need a genome file, which tells bedtools the length of each chromosome in your file. Consider why the tool would need this information…

bedtools complement -i exons.bed -g genome.txt | head
Loading...