File: quick-start.rst

package info (click to toggle)
bedtools 2.26.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 55,328 kB
  • sloc: cpp: 37,989; sh: 6,930; makefile: 2,225; python: 163
file content (73 lines) | stat: -rwxr-xr-x 1,458 bytes parent folder | download | duplicates (6)
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
###########
Quick start
###########

================
Install bedtools
================

.. code-block:: bash

  curl http://bedtools.googlecode.com/files/BEDTools.<version>.tar.gz > BEDTools.tar.gz
  tar -zxvf BEDTools.tar.gz
  cd BEDTools
  make
  sudo cp bin/* /usr/local/bin/


===============
Use bedtools
===============
Below are examples of typical bedtools usage. Using the "-h" option with any 
bedtools will report a list of all command line options.


Report the base-pair overlap between the features in two BED files.

.. code-block:: bash

  bedtools intersect -a reads.bed -b genes.bed


Report those entries in A that overlap NO entries in B. Like "grep -v"

.. code-block:: bash

  bedtools intersect  -a reads.bed -b genes.bed -v


Read BED A from STDIN. Useful for stringing together commands. For example, 
find genes that overlap LINEs but not SINEs.

.. code-block:: bash

  bedtools intersect -a genes.bed -b LINES.bed | \
    bedtools intersect -a stdin -b SINEs.bed -v


Find the closest ALU to each gene.

.. code-block:: bash

   bedtools closest -a genes.bed -b ALUs.bed
  

Merge overlapping repetitive elements into a single entry, returning the number of entries merged.

.. code-block:: bash

  bedtools merge -i repeatMasker.bed -n
  

Merge nearby repetitive elements into a single entry, so long as they are within 1000 bp of one another.

.. code-block:: bash

  bedtools merge -i repeatMasker.bed -d 1000