plot_heatmap: Plot similarity heatmap

Description Usage Arguments Details Value Examples

View source: R/plot_heatmap.R

Description

Plot a heatmap of similarities from many-to-many SNV profile comparisons.

Usage

1
2
3
plot_heatmap(similarities, cluster = TRUE, annotate = TRUE,
  annotate_size = 9, legend = TRUE, legend_size = c(36, 8),
  limits = c(0, 50, 90, 100), text_size = 14, colour = "#1954A6")

Arguments

similarities

The long-format dataframe containing the data.

cluster

Cluster the samples based on similarity (boolean).

annotate

Annotate each cell with the score (boolean).

annotate_size

Text size of the annotations (numeric).

legend

Show a legend for the colour gradient (boolean).

legend_size

Height and width of the legend (vector of two integers).

limits

The limits for the colour gradient (vector of four integers).

text_size

Text size for axes, labels and legend (numeric).

colour

The main colour to use for the gradient (character).

Details

This function creates publication-ready plots of heatmaps for many-to-many sample comparisons, taking a long-format dataframe containing the summary statistics of each comparison as input.

Value

A ggplot2 graphical object.

Examples

1
2
3
4
5
# Load test similarities
data(test_similarities)

# Plot a similarity heatmap
heatmap <- plot_heatmap(test_similarities)

seqCAT documentation built on Nov. 1, 2018, 2:07 a.m.