compareMatrices: Compare matrices

View source: R/compareMatrices.R

compareMatricesR Documentation

Compare matrices

Description

Creates a plot with the heatmaps of m_1 and m_2 side by side. There is an option to order the matrices based on the ordering imposed upon m_1 by hclust.

Usage

compareMatrices(
  m_1,
  m_2,
  curr_title = "compare_psms",
  col_pal = c("#FFFFFF", (grDevices::colorRampPalette(RColorBrewer::brewer.pal(n = 7,
    name = "Blues")))(100)),
  breaks = defineBreaks(col_pal, lb = 0, ub = 1),
  col_pal_2 = col_pal,
  breask_2 = breaks,
  save_name = NA,
  col_names = T,
  order_rows = T,
  order_cols = T
)

Arguments

m_1

A matrix.

m_2

A matrix (if ordering by columns or rows the corresponding dimension must match that of m_1).

curr_title

The title given to the final plot.

col_pal

The colour palette for the heatmap of m_1 (corresponds to the color parameter in pheatmap::pheatmap).

breaks

The breaks for the colour palette of m_1 (corresponds to the breaks parameter in pheatmap::pheatmap).

col_pal_2

The colour palette for m_2 (default is to match col_pal).

save_name

The name to save the plot to (default is NA).

col_names

A logical instructing inclusion of column names in the heatmaps (default is TRUE).

order_rows

A logical instructing the function to order the rows of m_1 and m_2 based upon the ordering imposed by hclust on m_1.

order_cols

A logical instructing the function to order the columns of m_1 and m_2 based upon the ordering imposed by hclust on t(m_1).

breaks_2

The breaks for the colour palette of m_2.


stcolema/mdiHelpR documentation built on July 28, 2024, 5:41 a.m.