recdist_calc: Recombination-distance plot calculator

View source: R/diagnostics.R

recdist_calcR Documentation

Recombination-distance plot calculator

Description

Given a map and a linkage data.frame with pairwise recombination estimate, it returns a data.frame with all the information needed to produce a recombination-distance plot. These plots are useful to assess whether a given map order matches well with recombination estimates, since larger recombination estimates should be equivalent to larger map distances.

Plots a recombination-distance plot that allows to assess whether a given map order matches well with recombination estimates, since larger recombination estimates should be equivalent to larger map distances. It is useful to colour the dots with the LOD score.

Usage

recdist_calc(map, linkdf)

recdist_plot(recdist, main = NULL, ...)

Arguments

map

a data.frame containing at least "marker" and "position" columns.

linkdf

a data.frame with columns "marker_a", "marker_b", "r" for recombination and "LOD_independence" for the LOD score. Can be obtained using the 'linkage_shortcut' function and 'polymapR::linkage' function.

recdist

data.frame containing at least columns "recombination" and "distance". Can be obtained from 'recdist_calc'.

main

title of the plot.

...

additional parameters passed onto 'plot'

Value

A data.frame with columns "recombination", for the recombination frequency; "distance", for the physical distance between two markers; "marker_a" for the name of the first marker; "marker_b" for the name of the second marker; and "LOD" for the logarithm of odds score for that recombination estimate.

Functions

  • recdist_plot: plotting function for the output of 'recdist_calc'

Examples

data("linkage")
data("map")
recdist <- recdist_calc(map,linkdf)

#One can calculate it
data("linkage")
data("map")
recdist <- recdist_calc(map,linkdf)
recdist_plot(recdist, main = "Example 1")

#But it is also provided as wrapper output
data("iter_smooth_descent")
recdist_plot(sd_iter$iter1$recdist)

Alethere/SmoothDescent documentation built on Oct. 21, 2023, 7:11 a.m.