Plot a interaction heatmap.

PlotHeatmap(
  object,
  data = c("strength", "pvalue", "data"),
  which.cell = NULL,
  which.gene = NULL,
  aggregate = c("none", "cell", "gene"),
  counted = FALSE,
  selected = FALSE,
  scale = c("none", "cell", "gene"),
  scale_max = Inf,
  color = "RdBu",
  color.bins = 7,
  order = TRUE,
  order.dist = "minkowski",
  p = 1,
  filter = FALSE,
  low.cutoff = -Inf,
  high.cutoff = Inf,
  return.data = FALSE,
  Rowv = NA,
  Colv = NA,
  trace = "none",
  margins = c(10, 10),
  na.color = "black",
  key = TRUE,
  show.text = TRUE,
  ...
)

Arguments

object

Matchmaker object.

data

Data to plot. Default is interaction strength.

  • strength, Interaction strength.

  • pvalue, Interaction p value.

  • data, expression data.

which.cell

Interacting cell type name (saperated by '|' i.e 'DC|Mac') or index to plot. Default is NULL.

which.gene

Interacting gene name (saperated by '_' i.e 'CSF1_CSF1R') or index to plot. Default is NULL.

aggregate

Type of aggregation used. Default is none.

  • none, no aggregation.

  • cell, aggregated by cell-cell interactions.

  • gene, aggregated by ligand-receptor pairs.

counted

Aggregate interactions counts instead of strengths. Default is FALSE.

selected

Use selected data if calculated. Default is FALSE.

scale

Scale and center data. Default is none.

  • none, no scaling.

  • cell, scale data by cell (row).

  • gene, scale data by gene (column).

scale_max

Maximum cutoff for scaled data. Default is Inf.

color

Color palette name. Default is "RdBu", high values are in red and low values in blue. See details brewer.pal.

color.bins

Number of differen colors in pallete. Default is 7. See detail brewer.pal.

order

Whether to order the input data. Default is TRUE. See details seriate.

order.dist

Distance measure to be used. Default is "minkowski". See details dist.

p

Power of Minkowski distance Default is 1, aka Manhattan distance. See details dist.

filter

Whether to filter the input data based on low.cutoff and high.cutoff. Default is FALSE.

low.cutoff

Lower cutoff bound below which will be removed. Default is negative infinity.

high.cutoff

Upper cutoff bound above which will be removed. Default is positive infinity.

return.data

Whether to return the data used to plot. Default is FALSE.

Rowv

Whether to hierarchical cluster the rows. Default is NA. See details heatmap.2.

Colv

Whether to hierarchical cluster the columns Default is NA. See details heatmap.2.

trace

Whether to show the trace line. Defaults is none. See details heatmap.2.

margins

Plot margins. Defaults is c(10,10) See details heatmap.2.

na.color

Color for missing values (NAs). Defaults is black. See details heatmap.2.

key

Whether to show the key. Defaults is TRUE. See details heatmap.2.

show.text

Whether to show title, x-axis and y-axis text. Defaults is TRUE.

...

Additioanl arguments passed to heatmap.2.

Value

Plot a heatmap and optionally return the data used to generate the plot.

Examples

if (FALSE) {
 PlotHeatmap(object, data = "strength", aggregate = "row")
}