hapiAssemble: Consensus haplotype assembly

Description Usage Arguments Value Author(s) Examples

View source: R/assembly.R

Description

Assemble the consensus high-resolution haplotypes

Usage

1
2
hapiAssemble(gmt, draftHap, keepLowConsistency = TRUE,
  consistencyThresh = 0.85)

Arguments

gmt

a dataframe of genotype data of gamete cells

draftHap

a dataframe with draft haplotype information

keepLowConsistency

logical, if low-consistent gamete cells should be kept

consistencyThresh

a numeric value of the threshold determining low-consistent gamete cells compared with the draft haplotype. Default is 0.85

Value

a dataframe containing phased haplotypes

Author(s)

Ruidong Li

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
finalDraft <- rep(0,500)
names(finalDraft) <- seq_len(500)

ref <- rep(0,500)
alt <- rep(1,500)

gmtDa <- data.frame(gmt1=ref, gmt2=alt, gmt3=ref,
gmt4=ref, gmt5=c(alt[1:250], ref[251:500]),
stringsAsFactors = FALSE)

idx1 <- sort(sample(seq_len(500), 30, replace = FALSE))
idx2 <- sort(sample(seq_len(500), 30, replace = FALSE))
idx3 <- sort(sample(seq_len(500), 30, replace = FALSE))

gmtDa[idx1,1] <- NA
gmtDa[idx2,2] <- NA
gmtDa[idx3,3] <- NA

consensusHap <- hapiAssemble(draftHap = finalDraft, gmt = gmtDa)

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