hapiAssembleEnd: Assembly of haplotypes in regions at the end of a chromosome

Description Usage Arguments Value Author(s) Examples

Description

Assembly of haplotypes in regions at the end of a chromosome

Usage

1
hapiAssembleEnd(gmt, draftHap, consensusHap, k = 300)

Arguments

gmt

a dataframe of genotype data of gamete cells

draftHap

a dataframe with draft haplotype information

consensusHap

a dataframe of the consensus haplotype information

k

a numeric value for the number of hetSNPs that will be combined with markers beyond the framework for assembly. Default is 300

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
20
21
22
23
24
25
26
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 <- data.frame(hap1=rep(0,500),hap2=rep(1,500),
total=rep(5,500),rate=rep(1,500),
confidence=rep('F',500),
stringsAsFactors = FALSE)
rownames(consensusHap) <- seq_len(500)

consensusHap <- hapiAssembleEnd(gmt = gmtDa, draftHap = finalDraft, 
consensusHap = consensusHap, k = 300)

Jialab-UCR/Hapi documentation built on May 30, 2019, 11:41 a.m.