plot_heatmap {seqCAT} | R Documentation |
Plot a heatmap of similarities from many-to-many SNV profile comparisons.
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")
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). |
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.
A ggplot2 graphical object.
# Load test similarities data(test_similarities) # Plot a similarity heatmap heatmap <- plot_heatmap(test_similarities)