kinship.heatmap {ASRgenomics}R Documentation

Enhanced heatmap plot for a kinship matrix K

Description

Generates a heatmap with dendrogram based on a provided kinship matrix. This matrix can be a pedigree relationship matrix \boldsymbol{A}, a genomic relationship matrix \boldsymbol{G} or a hybrid relationship matrix \boldsymbol{H}. Individual names should be assigned to rownames and colnames. It sorts individuals according to dendrogram in both columns and rows.

Usage

kinship.heatmap(
  K = NULL,
  dendrogram = TRUE,
  clustering.method = c("hierarchical", "kmeans"),
  dist.method = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
  row.label = TRUE,
  col.label = FALSE
)

Arguments

K

Input of a kinship matrix in full format (n \times n) (default = NULL).

dendrogram

If TRUE a dendrogram is added to the columns based on the kinship matrix (default = TRUE).

clustering.method

The clustering method considered for the dendrogram. Options are: "hierarchical" and "kmeans" (default = "hierarchical").

dist.method

The method considered to calculate the distance matrix between individuals used for hierarchical clustering. Options are: "euclidean", "maximum", "manhattan", "canberra", "binary" and "minkowski" (default = "euclidean").

row.label

If TRUE the individual names (rownames) are added as labels to the left of the heatmap (default = TRUE).

col.label

If TRUE the individual names (colnames) are added as labels to the bottom of the heatmap (default = FALSE).

Details

Uses the library superheat from Barter and Yu (2018) to generate plots.

Value

A plot with the properties specified by the above arguments.

References

Barter, R.L. and Yu, B. 2018. Superheat: An R package for creating beautiful and extendable heatmaps for visualizing complex data. J. Comput. Graph. Stat. 27(4):910-922.

Examples

# Get G matrix.
G <- G.matrix(M = geno.apple, method = "VanRaden")$G
G[1:5, 1:5]

# Plot a subset of the individuals.
kinship.heatmap(K = G[1:10, 1:10], dendrogram = TRUE, row.label = TRUE, col.label = TRUE)


[Package ASRgenomics version 1.1.4 Index]