Skip to content

Installation and update

zhenin edited this page Jun 2, 2020 · 3 revisions

Installing HDL

Firstly you need an R (version >= 3.1.1) on your computer. If you have not installed R, you can easily download and install it from https://cran.r-project.org/.

Command line user

In order to download the R package HDL and related scripts, you can clone HDL repository and then install it using HDL.install.R:

git clone https://github.com/zhenin/HDL
cd HDL
Rscript HDL.install.R

Once the installation has completed, you can print out the version information by running HDL.run.R without any argument:

Rscript HDL.run.R

Then the description of the installed HDL software should be printed:

HDL: High-definition likelihood inference of genetic correlations (HDL)
Version 1.3.0 (2020-05-05) installed
Author: Zheng Ning, Xia Shen
Maintainer: Zheng Ning <zheng.ning@ki.se>

Tutorial: https://github.com/zhenin/HDL

Use citation("HDL") to know how to cite this work.

R user

You can use the install_github function in devtools package to install HDL from Github:

library(devtools)
install_github("zhenin/HDL/HDL")

and load the package via:

library(HDL)

On some server, you may have to install the package in your user directory via

with_libpaths(new = Sys.getenv("R_LIBS_USER"), install_github("zhenin/HDL/HDL"))

Updating HDL

Command line user

  1. Changing your directory to the location of HDL/ via cd /Path/to/HDL/

  2. Running git pull. It will automatically start updating the files in the HDL directory. If the current version is up to date, then it will print

    Already up-to-date.
    
  3. Running Rscript HDL.install.R to install the new version.

R user

You can simply use the install_github function again to install the latest version of HDL from Github. You may need to restart your R session after updating.