View source: R/distance_plot.R
distance_plot | R Documentation |
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.
distance_plot(snp_data, center_pos, r2_threshold = NULL)
snp_data |
A list describing SNP data and containing at least the
elements |
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. |
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.
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.
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.