Learn R Programming

Hapi - Chromosome-length haplotype inference using genotypic data of single gamete cells

Introduction

Hapi is a novel easy-to-use and high-efficient algorithm that only requires 3 to 5 gametes to reconstruct accurate and high-resolution haplotypes of an individual. The gamete genotype data may be generated from various platforms including genotyping arrays and sequencing even with low-coverage. Hapi simply takes genotype data of known hetSNPs in single gamete cells as input and report the high-resolution haplotypes as well as the confidence level of each phased hetSNPs. The package also includes a module allowing downstream analyses and visualization of identified crossovers in the gametes.

Manual and R script

The comprehensive manual of Hapi is available here: Hapi Manual.
R code of the workflow is available here: Hapi Workflow

Installation

Installation from Github

Hapi can be easily installed from Github by running the following command in R:

### Install dependencies ahead
install.packages('devtools')
install.packages('HMM')

devtools::install_github('Jialab-UCR/Hapi')

If the installation fails with the ERROR: object 'enexprs' is not exported by 'namespace:rlang', please install the developmental version of rlang package first.

devtools::install_github("tidyverse/rlang", build_vignettes = TRUE)

Installation locally

On Windows system

  • Download the package Hapi_0.0.1.tar.gz

  • Make sure you have Rtools installed

  • Add R and Rtools to the Path Variable on the Environment Variables panel, including

    c:\program files\Rtools\bin

    c:\program files\Rtools\gcc-4.6.3\bin

    c:\program files\R\R.3.x.x\bin\i386

    c:\program files\R\R.3.x.x\bin\x64

  • Run the following command in R

### Install 'HMM' package ahead
install.packages('HMM')

install.packages('Hapi_0.0.1.tar.gz', repos = NULL, type='source')

On Linux and Mac systems

Directly run the following command in R

### Install 'HMM' package ahead
install.packages('HMM')

install.packages('Hapi_0.0.1.tar.gz', repos = NULL, type='source')

Copy Link

Version

Install

install.packages('Hapi')

Monthly Downloads

123

Version

0.0.3

License

GPL-3

Maintainer

Last Published

July 28th, 2018

Functions in Hapi (0.0.3)

hapiBlockMPR

Maximum Parsimony of Recombination (MPR) for proofreading of draft haplotypes
Hapi-package

Hapi is a novel easy-to-use package that only requires 3 to 5 gametes to reconstruct accurate and high-resolution haplotypes of an individual. The gamete genotype data may be generated from various platforms including genotyping arrays and next generation sequencing even with low-coverage. Hapi simply takes genotype data of known hetSNPs in single gamete cells as input and report the high-resolution haplotypes as well as confidence level of each phased hetSNPs. The package also includes a module allowing downstream analyses and visualization of crossovers in the gametes.
gmt

Raw genotyping data
hapiAssemble

Consensus haplotype assembly
hapiCVDistance

Histogram of crossover distance
base2num

Convert genotype coded in A/T/C/G to 0/1
hapiCVMap

Visualization of crossover map
crossover

Crossover information across all gamete cells
gamete11

Haplotypes of a single gamete cell for visualization
hapiIdentifyCV

Indentify crossovers in gamete cells
hapiImupte

Imputation of missing genotypes in the framework
hapiAssembleEnd

Assembly of haplotypes in regions at the end of a chromosome
num2base

Convert genotype coded in 0/1 to A/T/C/G
hapiAutoPhase

Automatic inference of haplotypes
hapiFrameSelection

Selection of hetSNPs to form a framework
hapiGameteView

Visualization of haplotypes in a single gamete cell
hapiPhase

Phase draft haplotypes by majority voting
hg19

Chromosome information of hg19
hapiCVCluster

Filter out hetSNPs in potential complex regions
hapiCVResolution

Histogram of crossover resolution
hapiFilterError

Filter out hetSNPs with potential genotyping errors