plot_heatmap {seqCAT} | R Documentation

## Plot similarity heatmap

### Description

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

### Usage

    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

    # Load test similarities
    data(test_similarities)

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

[Package seqCAT version 1.14.1 Index]