heat: Association Heatmap

Description Usage Arguments Value Author(s) References Examples

View source: R/heat.R

Description

Visualizes n x m association table as heatmap.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
heat(
  df,
  Xvar = names(df)[[1]],
  Yvar = names(df)[[2]],
  fill = names(df)[[3]],
  star = NULL,
  p.adj.threshold = 1,
  association.threshold = 0,
  step = 0.2,
  colours = c("darkblue", "blue", "white", "red", "darkred"),
  limits = NULL,
  legend.text = "",
  order.rows = TRUE,
  order.cols = TRUE,
  filter.significant = TRUE,
  star.size = NULL,
  plot.values = FALSE
)

Arguments

df

Data frame. Each row corresponds to a pair of associated variables. The columns give variable names, association scores and significance estimates.

Xvar

X axis variable column name. For instance 'X'.

Yvar

Y axis variable column name. For instance 'Y'.

fill

Column to be used for heatmap coloring. For instance 'association'.

star

Column to be used for cell highlighting. For instance 'p.adj'.

p.adj.threshold

Significance threshold for the stars.

association.threshold

Include only elements that have absolute association higher than this value

step

color interval

colours

heatmap colours

limits

colour scale limits

legend.text

legend text

order.rows

Order rows to enhance visualization interpretability. If this is logical, then hclust is applied. If this is a vector then the rows are ordered using this index.

order.cols

Order columns to enhance visualization interpretability. If this is logical, then hclust is applied. If this is a vector then the rows are ordered using this index.

filter.significant

Keep only the elements with at least one significant entry

star.size

NULL Determine size of the highlight symbols

plot.values

Show values as text

Value

ggplot2 object

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

See citation('microbiome')

Examples

1
2
3
4
5
data(peerj32)
d1 <- peerj32$lipids[, 1:10]
d2 <- peerj32$microbes[, 1:10]
cc <- associate(d1, d2, method='pearson') 
p <- heat(cc, 'X1', 'X2', 'Correlation', star='p.adj')

microbiome documentation built on Nov. 8, 2020, 5:08 p.m.