hapiBlockMPR: Maximum Parsimony of Recombination (MPR) for proofreading of...

Description Usage Arguments Value Author(s) Examples

View source: R/draft.R

Description

Maximum Parsimony of Recombination (MPR) for proofreading of draft haplotypes

Usage

1
hapiBlockMPR(draftHap, gmtFrame, cvlink = 2, smallBlock = 100)

Arguments

draftHap

a dataframe with draft haplotype information

gmtFrame

a dataframe of raw genotype data in the framework

cvlink

a numeric value of number of cvlinks. Default is 2

smallBlock

a numeric value determining the size of small blocks that should be excluded from the draft haplotypes

Value

a dataframe of draft haplotypes after proofreading

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
ref <- rep(0,500)
alt <- rep(1,500)

gmtFrame <- 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))

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

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

draftHap <- hapiPhase(imputedFrame)

finalDraft <- hapiBlockMPR(draftHap, gmtFrame, cvlink=2, smallBlock=100)

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