Skip to content

Latest commit

 

History

History
155 lines (132 loc) · 5 KB

INSTALL.md

File metadata and controls

155 lines (132 loc) · 5 KB

Requirements:

Installing on Ubuntu

These instructions have been tested on Ubuntu versions 16.04 and 18.04.

  1. Update and upgrade your system (optional):

    $ sudo apt-get update
    $ sudo apt-get upgrade
  2. 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
    
  3. 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
  4. 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
  5. 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
    
  6. 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)

Installation on macOS

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.

  1. If your system does not already have R, download and install the latest version of R from the appropriate CRAN mirror site.

  2. 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
    
  3. 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.

  4. Installing Homebrew

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  5. Installing R Packages

    R
    install.packages("ape")
    source("https://bioconductor.org/biocLite.R")
    biocLite("ggtree")
    quit()
    
  6. Installing GNU tools and C libraries

    brew install gsl
    brew install igraph
    brew install flex
    
  7. Navigate to your preferred location in the filesystem and clone clmp from the GitHhub repository

    git clone https://github.com/PoonLab/clmp
    
  8. Compile and install the R package clmp

    autoconf
    ./configure
    R CMD INSTALL .