Debian Codegraph @

docs/content/tools/overlap.rst

raw
1 .. _overlap:
2
3 ###############
4 *overlap*
5 ###############
6 **overlap** computes the amount of overlap (in the case of positive values) or distance (in the case of
7 negative values) between feature coordinates occurring on the same input line and reports the result at
8 the end of the same line. In this way, it is a useful method for computing custom overlap scores from
9 the output of other BEDTools.
10
11 ==========================================================================
12 Usage and option summary
13 ==========================================================================
14 Usage:
15
16 ::
17
18 overlap [OPTIONS] -i <input> -cols s1,e1,s2,e2
19
20 =========================== ===============================================================================================================================================================================================================
21 Option Description
22 =========================== ===============================================================================================================================================================================================================
23 **-i** Input file. Use "stdin" for pipes.
24 **-cols** Specify the columns (1-based) for the starts and ends of the features for which you'd like to compute the overlap/distance. The columns must be listed in the following order: *start1,end1,start2,end2*
25 =========================== ===============================================================================================================================================================================================================
26
27
28
29 ==========================================================================
30 Default behavior
31 ==========================================================================
32 The default behavior is to compute the amount of overlap between the features you specify based on the
33 start and end coordinates. For example:
34
35 ::
36
37 bedtools window -a A.bed -b B.bed -w 10
38 chr1 10 20 A chr1 15 25 B
39 chr1 10 20 C chr1 25 35 D
40
41 # Now let's say we want to compute the number of base pairs of overlap
42 # between the overlapping features from the output of windowBed.
43
44 ::
45
46 bedtools windo -a A.bed -b B.bed -w 10 | overlap -i stdin -cols 2,3,6,7
47 chr1 10 20 A chr1 15 25 B 5
48 chr1 10 20 C chr1 25 35 D -5
49