#' Plot marker positions in a plotQTL plot.
#'
#' Plots a solid axis with marker locations to the left of each chromosome track.
#'
#' @param plotQTL A plotQTL object from plotQTL().
#' @param marker_tick_width Width of marker labels.
#' @param col Colour for lane margins.
#' @param lty Line style.
#' @param ... Further graphical parameters passed to \code{segments}.
#'
#' @export
plotQTL_ladder <-
function(plotQTL, marker_tick_width=0.5, col='gray50', lty='dashed', ...){
# positions for the chromosome vertical lines
chr_xv <- plotQTL$lane_margins[1,]
# Vertical lines for the main chromosome lines, with ticks for each marker.
segments(chr_xv, 0, chr_xv, -plotQTL$track_lengths)
for(i in 1:plotQTL$ntracks){ # tick markers
segments(chr_xv[i], -plotQTL$map[[i]],
chr_xv[i]-marker_tick_width, -plotQTL$map[[i]], lwd=0.5)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.