R/map_flip.R

Defines functions map_flip

Documented in map_flip

# map_flip
#' Invert a linkage group
#'
#' @param x Linkage group to invert
#' @return  Linkage group with inverted genetic positions
#' @author Dennis van Muijen
#' @export
map_flip <- function(x) {
  the_max <- max(x$Position)
  x$Position <- (x$Position - the_max) * -1
  x <- arrange(x, !! as.name("Position"))
  return(x)
}

Try the mapfuser package in your browser

Any scripts or data that you put into this service are public.

mapfuser documentation built on Oct. 10, 2017, 5:07 p.m.