phase_chunk: 'Phasing haplotype chunks. '

Description Usage Arguments Value Examples

View source: R/NewPhaseParent.R

Description

Phasing Parent's haplotypes using sliding window. These sliding windows were merged into a chunk if there is no conflict. Otherwise, they will be assigned into different chunks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
setup_dad_haps(df, hapcol = 4)

phase_chunk(GBS.array, win_length, haps, verbose, OR)

infer_dip(GBS.array, winidx, haps, returnhap = FALSE)

sum_max_log_1hap(GBS.array, winidx, dad_hap = haps[[a]])

setup_mom_haps(temmom)

maxlog_hap_ockid(dad_hap, mom_geno, mom_haps, kid_geno)

maxlog_hap_selfed_kid(haplotype, kid_geno)

jump_win(GBS.array, winstart, win_length, hetsites, haps)

Arguments

GBS.array

A GBS.array object generated from impute_parent orsim.array functions.

win_length

A list of vectors of Kid's GBS data. Coded with 0, 1 and 2, which is the copy of alternative alleles. Missing data should be coded with 3.

haps

all possible haplotypes (2^(win_length-1)) for a given window length.

verbose

Writing verbose messages. Default=TRUE.

temmom

Must be a data.frame(hap1, hap2, chunk, idx)

temmom

Must be a data.frame(hap1, hap2, chunk, idx)

Value

return A list of haplotype chunks.

Examples

1
2
3
4
5
GBS.array <- sim.array(size.array=50, numloci=1000)
win_length = 10
haps <- setup_haps(win_length)
probs <- error_mx(hom.error=0.02, het.error=0.8, imiss=0.2) 
chunklist <- phase_chunk(GBS.array, win_length, haps, verbose=TRUE)

yangjl/imputeR documentation built on May 4, 2019, 2:28 p.m.