density_plot: Plot of marker density along chromosome

Description Usage Arguments Details Value Examples


This is a high-level function to plot marker density along the chromosome. This may help in identifying regions that are poorly covered by markers and is thus helpful for troubleshooting.


density_plot(snp_data, chr_length = NULL, center_pos = NULL)



A list comprising at least an element called Markers, a data.frame giving information about a set of markers. See read_hapmap and read_vcf for more information about the structure of snp_data.


A numeric of length one. The length of the chromosome (in base pairs). This is used to set the plotting window of the x-axis from 0 to the length of the chromosome. If NULL (default), the plotting window will only cover those markers present in the dataset.


A numeric of length one. The position of the center of the gene of interest (in base pairs). This is used to add a red vertical line at gene position. If NULL, no vertical line will be added.


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.



malemay/HaplotypeMiner documentation built on May 28, 2019, 2:48 p.m.