interpolate_cM: Interpolate genetic distances

View source: R/interpolate_cM.R

interpolate_cMR Documentation

Interpolate genetic distances

Description

Creates monotone spline between physical (bp) and genetic (cM) distance

Usage

interpolate_cM(map, df = 8, max.extend = 5)

Arguments

map

Data frame with four columns: marker, chrom, bp, cM

df

Degrees of freedom for the spline

max.extend

Maximum distance (in cM) to extrapolate beyond the end of the input map

Details

The input map can be generated by merging an existing genetic map with positions in bp and cM with additional markers with only bp information. Interpolation is based on minimizing the mean-squared error between the original and interpolated positions in cM. For the df and max.extend parameters, use either a single integer (if same for all chromosomes) or a vector of length equal to the number of chromosomes.

Value

List containing

map

Map data frame with additional column named cM.spline

plot

ggplot2 object


jendelman/MapRtools documentation built on April 12, 2025, 12:46 p.m.