impute: Imputation of estimated recombination rates for segments...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/impute.R

Description

This function recursively imputes the recombination rate for missing segments. First it imputes the mean of the two neighbouring segments. In case that one of these segments is also missing, it then imputes the weighted mean of the four neighbouring segments putting higher weights to the closer segments. Exceptions were made for e.g. the first and last segment in the sequence. It also imputes those positions first, where more information is already available.

Usage

1
impute(data, index, two, segs)

Arguments

data

A data vector containing the estimated recombination rates per segment.

index

this is a vector containing the integer number of the segments without SNPs.

two

A logical parameter indicating whether two neighbouring values (if TRUE) or four neighbouring values (if FALSE) should be provided.

segs

A (non-negative) integer which reflects the number of segments considered. It is calculated in the program based on the user-defined segLength.

Details

The function calls itself after every imputation step trying to impute based on two neighbouring segments.

Value

data

This vector contains the estimated recombination rates including the imputed values for the segments without SNPs.

Author(s)

Philipp Hermann philipp.hermann@jku.at, Andreas Futschik

See Also

get_impute_data

Examples

1
2
3
##### Do not run these examples                                   #####
##### This command shows how it is used in the get_smuce function #####
##### pr.cor.nat = impute(pr.cor.nat, ind, two = T)               #####

PhHermann/LDJump documentation built on Nov. 16, 2019, 12:53 p.m.