hapiAutoPhase: Automatic inference of haplotypes

Description Usage Arguments Value Author(s) Examples

View source: R/autophase.R

Description

Automatic inference of haplotypes

Usage

1
hapiAutoPhase(gmt, code = "atcg")

Arguments

gmt

a dataframe of genotype data of gamete cells

code

a character indicating the code style of genotype data. One of 'atcg' and '01'. Default is 'atcg'

Value

a dataframe of inferred consensus haplotypes

Author(s)

Ruidong Li

Examples

1
2
3
4
5
6
7
8
9
ref <- sample(c('A','T'),500, replace=TRUE)
alt <- sample(c('C','G'),500, replace=TRUE)

gmt <- data.frame(chr=rep(1,500), pos=seq_len(500),
    ref=ref, alt=alt, gmt1=ref, gmt2=alt, gmt3=ref,
    gmt4=ref, gmt5=c(alt[1:250], ref[251:500]),
    stringsAsFactors = FALSE)
    
hapOutput <- hapiAutoPhase(gmt=gmt, code='atcg')

Hapi documentation built on May 2, 2019, 6:52 a.m.