Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

set.dist

Set Genetic Distance


Description

Returns an updated bed.matrix with genetic distances in centimorgan computed from the variant positions

Usage

set.dist(x, map, verbose = getOption("gaston.verbose", TRUE))

Arguments

x

A bed.matrix

map

The genetic map, given by a list of data frames (see Details)

verbose

If TRUE, display information on the function actions

Details

A map is a list of data frames, with names corresponding to chromosomes. Each of these data frames must have columns pos and dist corresponding to positions in bp and cM, respectively.

Such maps are too large to be included in a CRAN package. You can get two genetic maps for the Human Genome (build 36 and 37) in the package HumanGeneticMap on GitHub.

To install this package, run

install.packages("HumanGeneticMap", repos="https://genostats.github.io/R/")

You can then use this function with set.dist(x, HumanGeneticMap::genetic.map.b36) for example, for positions on the build 36. Use map = HumanGeneticMap::genetic.map.b37) for the build 37.

Value

A bed.matrix similar to x, with updated values in x@snps$dist.


gaston

Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models

v1.5.7
GPL-3
Authors
Hervé Perdry [cre, aut, cph], Claire Dandine-Roulland [aut, cph], Deepak Bandyopadhyay [cph] (C++ gzstream class), Lutz Kettner [cph] (C++ gzstream class)
Initial release
2020-09-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.