spline_IBD {polyqtlR}R Documentation

Fit splines to IBD probabilities

Description

Fits splines to IBD probabilities at a grid of positions at user-defined spacing.

Usage

spline_IBD(IBD_list, gap, method = "cubic", ncores = 1, log = NULL)

Arguments

IBD_list

List of IBD probabilities

gap

The size (in centiMorgans) of the gap between splined positions

method

One of two options, either "linear" or "cubic". The default method (cubic) fits cubic splines, and although more accurate, becomes computationally expensive in higher-density data-sets, where the linear option may be preferable.

ncores

Number of cores to use, by default 1 only. Works both for Windows and UNIX (using doParallel). Use parallel::detectCores() to find out how many cores you have available. Note that with large datasets, using multiple cores will use large amounts of memory (RAM). Single-core or e.g. 2-core evaluations, although slower, is less memory-intensive.

log

Character string specifying the log filename to which standard output should be written. If NULL log is send to stdout.

Value

Returns a list of similar format as IBD_list, with a splined IBD_array in place of the original IBD_array

Examples

data("IBD_4x")
IBD_4x.spl <- spline_IBD(IBD_list = IBD_4x, gap = 1)

[Package polyqtlR version 0.1.1 Index]