crossHm: crossHm

View source: R/crossHm.R

crossHmR Documentation

crossHm

Description

Plot a multi-panel heatmap from a list of SummarizedExperiment-class.

Usage

crossHm(
  ses,
  features,
  do.scale = TRUE,
  uniqueScale = FALSE,
  assayName = .getDef("assayName"),
  sortBy = seq_along(ses),
  only.common = TRUE,
  cluster_cols = FALSE,
  cluster_rows = is.null(sortBy),
  toporder = NULL,
  hmcols = NULL,
  breaks = .getDef("breaks"),
  gaps_at = .getDef("gaps_at"),
  gaps_row = NULL,
  name = NULL,
  top_annotation = .getDef("anno_columns"),
  left_annotation = .getDef("anno_rows"),
  anno_colors = list(),
  show_rownames = NULL,
  merge_legends = FALSE,
  show_colnames = FALSE,
  rel.width = NULL,
  ...
)

Arguments

ses

A (named) list of SummarizedExperiment-class objects, with some matching row.names between them.

features

A vector of features (i.e. row.names) to plot.

do.scale

Logical; whether to scale rows in each SE (default TRUE).

uniqueScale

Logical; whether to force the same colorscale for each heatmap.

assayName

The name of the assay to use; if multiple names are given, the first available will be used. Defaults to "logcpm", "lognorm".

sortBy

Names or indexes of 'ses' to use for sorting rows (default all)

only.common

Logical; whether to plot only rows common to all SEs (default TRUE).

cluster_cols

Logical; whether to cluster columns (default FALSE).

cluster_rows

Logical; whether to cluster rows (default TRUE if 'do.sortRows=FALSE', FALSE otherwise).

toporder

Optional verctor of categories on which to supra-order when sorting rows, or name of a 'rowData' column to use for this purpose.

hmcols

Colors for the heatmap.

breaks

Breaks for the heatmap colors. Alternatively, symmetrical breaks can be generated automatically by setting 'breaks' to a numerical value between 0 and 1. The value is passed as the 'split.prop' argument to the getBreaks function, and indicates the proportion of the points to map to a linear scale, while the more extreme values will be plotted on a quantile scale. 'breaks=FALSE' will disable symmetrical scale and quantile capping, while retaining automatic breaks. 'breaks=1' will produce a symmetrical scale without quantile capping.

gaps_at

Columns of 'colData' to use to establish gaps between columns.

gaps_row

A named vector according to which rows will be split.

name

The title of the heatmap key.

top_annotation

Columns of 'colData' to use for top annotation.

left_annotation

Columns of 'rowData' to use for left annotation.

anno_colors

List of colors to use for annotation.

show_rownames

Whether to show row names (default TRUE if 50 rows or less).

merge_legends

Logical; passed to draw-HeatmapList-method

show_colnames

Whether to show column names (default FALSE).

rel.width

Relative width of the heatmaps

...

Any other parameter passed to each call of Heatmap.

Value

A Heatmap list.

Examples

data("Chen2017", package="sechm")
se1 <- Chen2017[,1:6]
se2 <- Chen2017[,7:15]
se3 <- crossHm(list(se1=se1, se2=se2), row.names(se1)[1:10] )


plger/sechm documentation built on June 16, 2024, 7:53 a.m.