library(tibble)
# create a toy recombination map with at least 10Mb at each end
map <- tibble(
pos = c( 3L, 15L, 100L, 120L ) * 1e6L,
posg = c( 0, 10.4, 90.1, 110 )
)
# and length
pos_length <- 150L * 1e6L
# apply function!
map_fixed <- recomb_map_fix_ends_chr( map, pos_length )
# inspect
map_fixed
Run the code above in your browser using DataLab