View source: R/plot_scan1_heatmap.R
| plot_scan1_heatmap | R Documentation |
Heat map of multiple scan1 results
plot_scan1_heatmap(
x,
map,
chr = NULL,
y = NULL,
gap = NULL,
zlim = NULL,
color_scheme = c("viridis", "gray", "revgray", "heat", "terrain", "topo", "rainbow"),
col = NULL,
n_colors = 256,
swap_axes = FALSE,
chrlines = NULL,
rescale_by = c("none", "col", "chr", "both"),
...
)
x |
An object of class |
map |
A list of vectors of marker positions, as produced by
|
chr |
Selected chromosomes to plot; a vector of character strings. |
y |
Vector with length equal to |
gap |
Gap between chromosomes. The default is 1% of the total genome length. |
zlim |
Z-axis limits (a pair of numbers) |
color_scheme |
Color scheme for the heatmap (ignored if |
col |
Optional vector of colors for the heatmap. |
n_colors |
Number of z-axis colors (ignored if |
swap_axes |
If TRUE, put chromosome position on y-axis and lod columns on x-axis (default is to have chromosome position on x-axis and lod columns on y-axis) |
chrlines |
Color of lines at chromosome breaks (NULL for default choices; NA to skip them). |
rescale_by |
Rescale the LOD scores by column, chromosome, or both, by subtracting the maximum value. The default is not to rescale. |
... |
Additional graphics paramaters. |
None.
plot_scan1(), plot_lodpeaks(), graphics::image(); plot_colorscale()
grav2 <- read_cross2(system.file("extdata", "grav2.zip", package="qtl2"))
map <- insert_pseudomarkers(grav2$gmap, step=1)
probs <- calc_genoprob(grav2, map, error_prob=0.002)
out <- scan1(probs, grav2$pheno)
plot_scan1_heatmap(out, map)
# make the y-axis quantitative
y <- grav2$phenocovar$time
plot_scan1_heatmap(out, map, y=y, ylab=colnames(grav2$phenocovar))
# plot with colors white -> darkslateblue, and with color scale
col <- colorRampPalette(c("white", "darkslateblue"))(256)
zlim <- c(0, maxlod(out))
layout(cbind(1,2), width=c(3,1))
plot_scan1_heatmap(out, map, y=y, ylab=colnames(grav2$phenocovar),
col=col, zlim=zlim)
plot_colorscale(col=col, zlim=zlim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.