Debian Codegraph @

docs/content/installation.rst

raw
1 ############
2 Installation
3 ############
4
5
6 ``bedtools`` is intended to run in a "command line" environment on UNIX, LINUX
7 and Apple OS X operating systems. Installing ``bedtools`` involves either
8 downloading the source code and compiling it manually, or installing stable
9 release from package managers such as
10 `homebrew (for OS X) <http://mxcl.github.com/homebrew/>`_.
11
12
13
14
15 --------------------------
16 Installing stable releases
17 --------------------------
18
19 .....................................
20 Downloading a pre-compiled binary
21 .....................................
22 .. note::
23 1. The following approach will only work for Linux (non-OSX) systems.
24
25 Starting with release 2.28.0, we provide statically-linked binaries thast should work
26 right away on Linux systems. Go to the `releases <https://github.com/arq5x/bedtools2/releases>`_
27 page and look for the static binary named `bedtools.static.binary`. Right click on it, get the URL, then download it
28 with `wget` or `curl` and you should be good to go.
29
30 As an example. First, download `bedtools.static.binary` from the latest release `here <https://github.com/arq5x/bedtools2/releases>`_
31
32 .. code-block:: bash
33
34 mv bedtools.static.binary bedtools
35 chmod a+x bedtools
36
37
38 .....................................
39 Compiling from source via Github
40 .....................................
41
42 Stable, versioned releases of bedtools are made available on Github at the
43 `bedtools2 repository <https://github.com/arq5x/bedtools2/>`_ under
44 the `releases <https://github.com/arq5x/bedtools2/releases>`_ tab.
45 The following commands will install ``bedtools`` in a local directory on an UNIX or OS X machine.
46
47 .. note::
48 1. The bedtools Makefiles utilize the GCC compiler. One should edit the
49 Makefiles accordingly if one wants to use a different compiler.
50
51 .. code-block:: bash
52
53 $ wget https://github.com/arq5x/bedtools2/releases/download/v2.29.1/bedtools-2.29.1.tar.gz
54 $ tar -zxvf bedtools-2.29.1.tar.gz
55 $ cd bedtools2
56 $ make
57
58 At this point, one should copy the binaries in ./bin/ to either
59 ``usr/local/bin/`` or some other repository for commonly used UNIX tools in
60 your environment. You will typically require administrator (e.g. "root" or
61 "sudo") privileges to copy to ``usr/local/bin/``. If in doubt, contact you
62 system administrator for help.
63
64 .....................................
65 Installing with package managers
66 .....................................
67
68 In addition, stable releases of ``bedtools`` are also available through package
69 managers such as `homebrew (for OS X) <http://mxcl.github.com/homebrew/>`_,
70 ``apt-get`` and ``yum``.
71
72 **Fedora/Centos**. Adam Huffman has created a Red Hat package for bedtools so
73 that one can easily install the latest release using "yum", the Fedora
74 package manager. It should work with Fedora 13, 14 and EPEL5/6 (
75 for Centos, Scientific Linux, etc.).
76
77 .. code-block:: bash
78
79 yum install BEDTools
80
81 **Debian/Ubuntu.** Charles Plessy also maintains a Debian package for bedtools
82 that is likely to be found in its derivatives like Ubuntu. Many thanks to
83 Charles for doing this.
84
85 .. code-block:: bash
86
87 apt-get install bedtools
88
89 **Homebrew**. Carlos Borroto has made BEDTools available on the bedtools
90 package manager for OSX.
91
92 .. code-block:: bash
93
94 brew tap homebrew/science
95 brew install bedtools
96
97 **MacPorts**. Alternatively, the MacPorts ports system can be used to install BEDTools on OSX.
98
99 .. code-block:: bash
100
101 port install bedtools
102
103 -----------------------------
104 Development versions
105 -----------------------------
106
107 The development version of bedtools is maintained in a Github
108 `repository <https://www.github.com/arq5x/bedtools2>`_. Bug fixes are addressed
109 in this repository prior to release, so there may be situations where you will
110 want to use a development version of bedtools prior to its being promoted to
111 a stable release. One would either clone the repository with ``git``, as
112 follows and then compile the source code as describe above:
113
114 .. code-block:: bash
115
116 git clone https://github.com/arq5x/bedtools2.git
117
118
119 or, one can download the source code as a ``.zip`` file using the Github
120 website. Once the zip file is downloaded and uncompressed with the ``unzip``
121 command, one can compile and install using the instructions above.
122
123 .. image:: images/github-zip-button.png