distance_plot: Plot of linkage disequilibrium as a function of the distance...

View source: R/distance_plot.R

distance_plotR Documentation

Plot of linkage disequilibrium as a function of the distance between markers

Description

This is a high-level plotting function used to plot the linkage disequilibrium between pairs of markers as a function of the distance between them. One should expect a pattern of decreasing linkage disequilibrium with increasing distance. It is important to note that only pairs of markers that are across the gene are represented, as these are the only ones relevant to haplotype generation.

Usage

distance_plot(snp_data, center_pos, r2_threshold = NULL)

Arguments

snp_data

A list describing SNP data and containing at least the elements LD, read_hapmap for more information on the contents of this object.

center_pos

The central position (in base pairs) of the gene for which haplotypes are being defined.

r2_threshold

A numeric of length one. The r2 value that is considered as a treshold for selecting marker pairs in a given analysis. Results in a red horizontal line being added to the graph. NULL by default, in which case no horizontal line is added to the graph.

Details

As the output of this function is a graphical object from package ggplot2, it is possible to customize the appearance of the graph and add layers to the graph using the syntax of this package.

Value

A graphical object inheriting from classes gg and ggplot from package ggplot2, which can be either assigned to an object or printed to a graphical device.

Examples

NULL


malemay/HaplotypeMiner documentation built on Feb. 6, 2024, 3:29 a.m.