R/combine-chr.R

combine_chr <- function(map, map.function)
{
  # combine chromosomes together into an object which has the probability 
  # of recombination between adjacent loci
  map2 <- unlist(map)
  
  # computes recombination fractions from map distances using cMfx
  genome <- vector()

  for (i in 1:length(map))
	genome <- c(genome, sapply(diff(map[[i]]), map.function), 0.5)

  return(genome[1:(length(genome)-1)])
}
behuang/mpMap documentation built on May 12, 2019, 10:53 a.m.