Debian Codegraph @

docs/content/quick-start.rst

raw
1 ###########
2 Quick start
3 ###########
4
5 ================
6 Install bedtools
7 ================
8
9 .. code-block:: bash
10
11 curl http://bedtools.googlecode.com/files/BEDTools.<version>.tar.gz > BEDTools.tar.gz
12 tar -zxvf BEDTools.tar.gz
13 cd BEDTools
14 make
15 sudo cp bin/* /usr/local/bin/
16
17
18 ===============
19 Use bedtools
20 ===============
21 Below are examples of typical bedtools usage. Using the "-h" option with any
22 bedtools will report a list of all command line options.
23
24
25 Report the base-pair overlap between the features in two BED files.
26
27 .. code-block:: bash
28
29 bedtools intersect -a reads.bed -b genes.bed
30
31
32 Report those entries in A that overlap NO entries in B. Like "grep -v"
33
34 .. code-block:: bash
35
36 bedtools intersect -a reads.bed -b genes.bed -v
37
38
39 Read BED A from STDIN. Useful for stringing together commands. For example,
40 find genes that overlap LINEs but not SINEs.
41
42 .. code-block:: bash
43
44 bedtools intersect -a genes.bed -b LINES.bed | \
45 bedtools intersect -a stdin -b SINEs.bed -v
46
47
48 Find the closest ALU to each gene.
49
50 .. code-block:: bash
51
52 bedtools closest -a genes.bed -b ALUs.bed
53
54
55 Merge overlapping repetitive elements into a single entry, returning the number of entries merged.
56
57 .. code-block:: bash
58
59 bedtools merge -i repeatMasker.bed -n
60
61
62 Merge nearby repetitive elements into a single entry, so long as they are within 1000 bp of one another.
63
64 .. code-block:: bash
65
66 bedtools merge -i repeatMasker.bed -d 1000
67
68
69
70
71
72
73