Get HapMap recombination rates for hg18 (build 36)


Recombination rate files can be used to calculate recombination distances for genome locations, in centimorgans. This function downloads these reference files from the hapmap NCBI website. At the time of writing they were only availble for build 36. If using a more recent build I suggest using the conversion function conv.37.36(), then recomWindow(), then conv.36.37() to get recombination distances for other builds. If getOption("") is <=0 then no files will be kept. Otherwise an object containing this mapping data will be saved in the local directory if dir=NULL, or else in the directory specified. Allowing this reference to be saved will greatly increase the speed of this function for subsequent lookups


2 = NULL, verbose = TRUE, refresh = FALSE,
  compress = FALSE)



character, location to store binary file with the recombination maps for chromosomes 1-22. If NULL then getOption("")>=1 will result in this file being stored in the current directory, or if <=0, then this file will not be stored.


logical, if the binary file is not already downloaded, when verbose is TRUE, there will be some output to the console indicating the progress of the download. If FALSE, all output is suppressed.


logical, if you already have the binary file in the current directory, this argument will let you re-download and re-generate this file, e.g, if the file is modified or corrupted this will make a new one without having to manually delete it


logical, this argument is passed to 'save' and will result in a larger binary file size, but quicker loading times, so 'FALSE' is recommended for faster retrieval.


Returns a list object of length 22, containing the recombination map files as 22 separate data.frame's.


## not run as it takes roughly 2 minutes to download and read-in ##
setwd(tempdir()) <-
file.on.disk <- "rrates_genetic_map_chr_1_22_b36.RData"
if(file.exists(file.on.disk)) { unlink(file.on.disk) } # remove the downloaded file

Want to suggest features or report bugs for Use the GitHub issue tracker. Vote for new features on Trello.

comments powered by Disqus