View source: R/interpolate_cM.R
interpolate_cM | R Documentation |
Creates monotone spline between physical (bp) and genetic (cM) distance
interpolate_cM(map, df = 8, max.extend = 5)
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 |
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.
List containing
Map data frame with additional column named cM.spline
ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.