autoplot.biclustermd {biclustermd}R Documentation

Make a heatmap of sparse biclustering results

Description

Make a heatmap of sparse biclustering results

Usage

## S3 method for class 'biclustermd'
autoplot(
  object,
  axis.text = NULL,
  reorder = FALSE,
  transform_colors = FALSE,
  c = 1/6,
  cell_alpha = 1/5,
  col_clusts = NULL,
  row_clusts = NULL,
  ...
)

Arguments

object

An object of class "biclustermd".

axis.text

A character vector specifying for which axes text should be drawn. Can be any of "x", "col" for columns, "y", "row" for rows, or any combination of the four. By default this is NULL; no axis text is drawn.

reorder

A logical. If TRUE, heatmap will be sorted according to the cell-average matrix, A.

transform_colors

If equals TRUE then the data is scaled by c and run through a standard normal cdf before plotting. If FALSE (default), raw data values are used in the heat map.

c

Value to scale the data by before running it through a standard normal CDF. Default is 1/6.

cell_alpha

A scalar defining the transparency of shading over a cell and by default this equals 1/5. The color corresponds to the cell mean.

col_clusts

A vector of column cluster indices to display. If NULL (default), all are displayed.

row_clusts

A vector of row cluster indices to display. If NULL (default), all are displayed.

...

Arguments to be passed to geom_vline() and geom_hline().

Value

An object of class ggplot.

Examples

data("synthetic")

bc <- biclustermd(synthetic, col_clusters = 3, row_clusters = 2,
                miss_val = mean(synthetic, na.rm = TRUE),
                miss_val_sd = sd(synthetic, na.rm = TRUE),
                col_min_num = 2, row_min_num = 2,
                col_num_to_move = 1, row_num_to_move = 1,
                max.iter = 10)
bc
autoplot(bc)

autoplot(bc, axis.text = c('x', 'row')) +
    ggplot2::scale_fill_distiller(palette = "Spectral", na.value = "white")

# Complete shading
autoplot(bc, axis.text = c('col', 'row'), cell_alpha = 1)

# Transformed values and no shading
autoplot(bc, transform_colors = TRUE, c = 1/20, cell_alpha = 0)

# Focus on row cluster 1 and column cluster 2
autoplot(bc, col_clusts = 2, row_clusts = 1)


[Package biclustermd version 0.2.3 Index]