Category

Genomic Interval Manipulation


Usage

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


Manual

This tool is part of the bedtools suite and is also known as complementBed.

Schematic summary of the functionality

Chromosome:     ~~~~~~~~~~~~~~~~~~~~~~~~~

Input regions:  ====   ====       =======

Output regions:     ===    =======       

Required arguments

  • -i <bed/gff/vcf>: Path to the input file containing intervals to be clustered.
  • -g <GENOME>: Chromosome size file. The file should tab delimited and structured as follows: <chromName> <chromSize>.  You can get this file for the genome release that you are working with by using fetchChromSizes.

Options

  • -L: Limit output to solely the chromosomes with records in the input file.

Examples

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
Only report chromosomes that are in the input file

Use the -L option to Limit the output to solely the chromosomes that are represented in the input file. Chromosomes that are in -g but not -i will be suppressed

$ 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


Share your experience or ask a question