# Introduction: installing and citing Haplin

#### Hakon K. Gjessing and Julia Romanowska

#### 2024-08-20

# Citing use of Haplin

If you find Haplin useful, please acknowledge our work by citing:

> Gjessing HK and Lie RT. “Case-parent triads: Estimating single- and double-dose effects of fetal and maternal disease gene haplotypes.” Annals of Human Genetics (2006) 70, pp. 382-396.

The BibTex entry for LaTeX users can be obtained by the following command in R:

    citation( "Haplin" )

    ## To cite package 'Haplin' in publications use:
    ##
    ##   Gjessing HK and Lie RT. Case-parent triads: Estimating single- and
    ##   double-dose effects of fetal and maternal disease gene haplotypes.
    ##   Annals of Human Genetics (2006) 70, pp. 382-396
    ##
    ## A BibTeX entry for LaTeX users is
    ##
    ##   @Article{,
    ##     title = {Case-parent triads: Estimating single- and double-dose
    ##  effects of fetal and maternal disease gene haplotypes},
    ##     author = {H\aa{}kon K Gjessing and Rolv Terje Lie},
    ##     journal = {Annals of Human Genetics},
    ##     volume = {70},
    ##     number = {3},
    ##     pages = {382--396},
    ##     year = {2006},
    ##   }

# Obtaining and installing Haplin

## Requirements

Haplin is written for use with the statistical software R. However, it is easy to install and requires no previous knowledge of R. R can be downloaded free of charge from The R Project for Statistical Computing. Haplin is implemented as a standard R library, and should run without problems on all reasonably new R versions, for Windows, Linux or MAC.

Haplin is dependent on several other R packages:

`MASS, mgcv, tools, ff, ffbase, snow`

These are automatically installed together with Haplin (see below).

If you are using Windows, you should install RTools before installing Haplin in R. RTools include the zip command, which is required by the ff package.

Moreover, if you want to use the plotting functions for plotting the results of haplinSlide and haplinStrat, you should install the ggplot2 package separately. You can still use Haplin if you don’t have this package, though!

For running on a cluster, you would need the Rmpi package installed, see the vignette “Running Haplin on cluster”.

## Installation

To install Haplin in R:

    install.packages( "Haplin", dependencies = TRUE )

Haplin and the dependent packages will then be installed automatically over the internet from the CRAN library.

To start using Haplin, open a new R session (either in a terminal window or any IDE, e.g., RStudio). Then, use the R command:

    library( Haplin )

Haplin is then loaded and ready for use.