plot_resid_heatmap: Plot a heatmap of the residual pairwise dissimilarities...

Description Usage Arguments Details See Also Examples

Description

Given a set of EEMS output directories, this function generates a heatmap of the n-by-n matrix of residual dissimilarities between pairs of individuals. The residuals are the differences between the observed and the fitted dissimilarities; the rows and columns, which correspond to individuals, are in the same order as the samples in datapath.coord and datapath.diffs.

Usage

1
plot_resid_heatmap(datapath, mcmcpath, hm_colors = NULL, hm_scale = NULL)

Arguments

datapath

The full path and the file name of the input diffs matrix.

mcmcpath

A vector of EEMS output directories, for the same dataset. Warning: There is minimal checking that the directories all correspond to the same dataset.

hm_colors

The heatmap color palette as a vector of colors, ordered from low to high. Defaults to a white-to-red palette.

hm_scale

A fixed range for the heatmap colors. The default is NULL, so the color space is the observed range of the residuals.

Details

Applicable only in the case of SNP data when the observed dissimilarity matrix is computed explicitly.

See Also

make_eems_plots, plot_population_grid, plot_voronoi_tiles

Examples

1
2
3
4
5
6
7
# Use the provided example or supply the path to your own EEMS run
extdata <- system.file("extdata", package = "reemsplots2")
datapath <- file.path(extdata, "EEMS-barrier")
mcmcpath <- file.path(extdata, "EEMS-barrier")

plots <- plot_resid_heatmap(datapath, mcmcpath, hm_colors = c("gray99", "red"))
plots

dipetkov/reemsplots2 documentation built on May 15, 2019, 8:47 a.m.