- R software environment
- R packages
- GNU tools
- C libraries:
These instructions have been tested on Ubuntu versions 16.04 and 18.04.
-
Update and upgrade your system (optional):
$ sudo apt-get update $ sudo apt-get upgrade
-
If you do not already have R on your system, install it using the package manager:
$ sudo apt-get install r-base $ sudo apt-get install r-base-dev
-
Install the required R packages:
$ R > install.packages("ape") > install.packages("Rcpp")
If you are running R 3.6+, use the following commands to install Bioconductor and ggtree:
> if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") > BiocManager::install() > BiocManager::install("ggtree")
If you are running an older version of R, use the following commands:
> source("https://bioconductor.org/biocLite.R") > biocLite("ggtree")
Finally, exit R to return to the command line:
> quit() Save workspace image? [y/n/c]: n
-
Install the required GNU tools and C libraries
$ sudo apt install libgsl-dev $ sudo apt install libigraph0v5 $ sudo apt install libigraph0-dev $ sudo apt install flex $ sudo apt install autoconf
-
Download the clmp R package from GitHub:
$ git clone https://github.com/PoonLab/clmp
If you do not have git installed or would prefer to not clone the repository, you can download a ZIP archive of the package:
$ wget https://github.com/PoonLab/clmp/archive/master.zip $ unzip master.zip $ cd clmp-master
-
Build and install the R package
$ autoconf $ ./configure $ R CMD INSTALL . * installing to library ‘/home/art/R/x86_64-pc-linux-gnu-library/3.6’ * installing *source* package ‘clmp’ ... ** using staged installation configure: creating ./config.status config.status: creating src/Makevars ** libs make: Nothing to be done for 'all'. installing to /home/art/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-clmp/00new/clmp/libs ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (clmp)
It is generally easier to install third-party packages and libraries using a package manager like MacPorts and Homebrew. We prefer using Homebrew, so these instructions are written assuming that you are using this package manager, although similar results should be obtainable with MacPorts.
-
If your system does not already have R, download and install the latest version of R from the appropriate CRAN mirror site.
-
If Xcode is not already installed on your system, open the Terminal application and enter the following:
xcode-select --install
Follow the generated prompts to the end of installation. To verify that Xcode was correctly installed check what version of Xcode was installed:
xcodebuild -version
-
Installing the Command Line Tools. Go to http://developer.apple.com/downloads and sign in with your Apple ID (the same one you use for iTunes and app purchases). Search for "command line tools" (in the search field on the left), then click on version corresponding to the installed version of Xcode and click on the the .dmg link to download it. Run the .dmg and follow the generated prompts to the end of installation.
-
Installing Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Installing R Packages
R install.packages("ape") source("https://bioconductor.org/biocLite.R") biocLite("ggtree") quit()
-
Installing GNU tools and C libraries
brew install gsl brew install igraph brew install flex
-
Navigate to your preferred location in the filesystem and clone clmp from the GitHhub repository
git clone https://github.com/PoonLab/clmp
-
Compile and install the R package
clmp
autoconf ./configure R CMD INSTALL .