Learn R Programming

gpyramid (version 0.0.1)

util_recom_mat: Util function to generate recom_mat from raw data. It returens the recombination probability based on Halden's map function

Description

Util function to generate recom_mat from raw data. It returens the recombination probability based on Halden's map function

Usage

util_recom_mat(in_df, unit = "cM")

Value

util_recom_mat function returns a matrix of recombination probability between each combination of genes.

Arguments

in_df

Data frame of raw data. The column names should be "Gene", "Chr" and "cM".

unit

Unit of the gene positions. In the current version, it should be "cM".

References

Haldane (1919) The combination of linkage values, and the calculation of distances between the loci of linked factors. Journal of Genetics 8: 299-309.

Examples

Run this code

in_df <- data.frame(Gene = c("g1", "g2", "g3", "g4"),
                    Chr = c("1A", "1B", "2A", "2A"),
                    cM = c(30, 50, 35, 50))

util_recom_mat(in_df)

Run the code above in your browser using DataLab