File: complement.rst

package info (click to toggle)
bedtools 2.30.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 56,588 kB
  • sloc: ansic: 38,500; cpp: 29,738; sh: 7,955; makefile: 661; python: 235; javascript: 16
file content (86 lines) | stat: -rwxr-xr-x 1,866 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.. _complement:

###############
*complement*
###############

|

.. image:: ../images/tool-glyphs/complement-glyph.png 
    :width: 600pt 

|


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

    
.. seealso::

    :doc:`../tools/merge`
    

==========================================================================
Usage and option summary
==========================================================================
**Usage**:
::

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

**(or)**:
::

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


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

.. code-block:: bash

  $ 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

==========================================================================
``-L`` Only report chromosomes that are in the `-i` file
==========================================================================
Use the "**-L**" option to `L`imit the output to solely the chromosomes
that are represented in the `-i` file. Chromosomes that are in `-g` but
not `-i` will be suppressed

For example (note the difference in coverage with and without **-s**:

.. code-block:: bash

  $ 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