CLONE

If you need to build the package yourself for your own version of bedtools, first clone the git repository. From the command line, type:

git clone https://github.com/PhanstielLab/bedtoolsr.git

some image

BUILD

To build the package, run the Python script makePackage.py, located inside the bedtoolsr repository dev folder. Command-line arguments specify the path to bedtools that you want to use, the output directory, and the version suffix of the package:

usage: makePackage.py [-h] [-B BEDTOOLS] [-O OUTPUT] [-V VERSION]

optional arguments:
  -h, --help            show this help message and exit
  -B BEDTOOLS, --bedtools BEDTOOLS
                        path to your bedtools
  -O OUTPUT, --output OUTPUT
                        directory to write package to
  -V VERSION, --version VERSION
                        version number of package
Unit tests will automatically be run after the package is built. If successful, you should see something like this:

══ testthat results  ═══════════════════════════════════════════════════════════
OK: 24 SKIPPED: 0 FAILED: 0

python makePackage.py some image

FILES

The resulting package directory should contain tests in inst/tests (because they are copied here, they will be installed with the package such that unit testing can confirm functionality, as discussed here), documentation in man, and code files in R.


some image

Then install by opening R and typing:
install.packages("/path/to/bedtools_yourversion", type="source", repos=NULL)
More details can be found here.