5.1.9. complement

### Navigation

- index
- next |
- previous |
- bedtools v2.18.0 »
- 5. The BEDTools suite »

# 5.1.9. complement

`bedtools complement` returns all intervals in a genome that are not covered by at least one interval in the input BED/GFF/VCF file.

See also

merge

## 5.1.9.1. Usage and option summary

Usage:

    bedtools complement -i <BED/GFF/VCF> -g <GENOME>

(or):

    complementBed -i <BED/GFF/VCF> -g <GENOME>

## 5.1.9.2. Default behavior

By default, `bedtools complement` returns all genomic intervals that are not covered by at least one record from the input file.

    $ cat A.bed
    chr1  100  200
    chr1  400  500
    chr1  500  800

    $ cat my.genome
    chr1  1000
    chr2  800

    $ bedtools complement -i A.bed -g my.genome
    chr1  0   100
    chr1  200 400
    chr1  800 1000
    chr2  0   800

comments powered by Disqus

### Navigation

- index
- next |
- previous |
- bedtools v2.18.0 »
- 5. The BEDTools suite »

### Edit and improve this document!

This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.

1. Go to 5.1.9. complement on GitHub.
2. Edit files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
3. Fill in the Commit message text box at the bottom of the page describing why you made the changes. Press the Propose file change button next to it when done.
4. Then click Send a pull request.
5. Your changes are now queued for review under the project's Pull requests tab on GitHub!

For an introduction to the documentation format please see the reST primer.