plotHeatmap: Plot heatmap.

plotHeatmapR Documentation

Plot heatmap.

Description

Given a data frame or a matrix, plot a heatmap with R package ComplexHeatmap. This functions is useful for plot results from movStat().

Usage

plotHeatmap(
  heatMtx,
  refs = NULL,
  plotPre = NULL,
  cluster_rows = TRUE,
  cluster_cols = FALSE,
  show_rownames = FALSE,
  show_colnames = TRUE,
  treeheight_row = 0,
  treeheight_col = 0,
  show_grid = FALSE,
  main = "",
  ...
)

Arguments

heatMtx

a matrix of PAindex, which is normally from movAPAindex() or movPAindex().

refs

reference condition, can beNULL/0350... Use to order other conditions with refs. If refs is not NULL, then order other columns with refs, and put refs in the left most columns. If refs!=NULL, cluster_cols=FALSE.

plotPre

Output pdf file name prefix. If not NULL, then output plot to <plotPre>.pdf.

cluster_rows

See ComplexHeatmap.

cluster_cols

See ComplexHeatmap.

show_rownames

show row names or not.

show_colnames

show column names or not.

treeheight_row

show row tree or not (=0 not show).

treeheight_col

show column tree or not (=0 not show).

show_grid

show grey grid or not.

main

specify the title of the plot.

...

Dot arguments passed to ComplexHeatmap.

Details

plotHeatmap will automatelly determine whether to use discrete colors for a heatMtx. If the number of unique elements in heatMtx (e.g., tf01 matrix from movStat()) is less than 9, then will use discrete colors.

See Also

Other visualization functions: movViz(), outputHeatStat()

Examples

data(PACds)
## get some DE results.
swDE=movUTRtrend(PACds, group='group', method='DE',
avgPACtag=10, avgGeneTag=20,
aMovDEPACRes=DEPAC, DEPAC.padjThd=0.01,
mindist=50, fisherThd=0.01, logFCThd=1, selectOne='fisherPV')
## get heatmapResults.
heat=movRes2heatmapResults(swDE)
## Filter switching genes.
heatUp=subsetHeatmap(heat, padjThd=0.05, valueThd=1)
plotHeatmap(heatUp@value, refs=c('anther.embryo'), show_rownames=TRUE, plotPre=NULL)
plotHeatmap(heatUp@value, show_rownames=TRUE, plotPre=NULL, cluster_rows=TRUE)

BMILAB/movAPA documentation built on Jan. 3, 2024, 11:09 p.m.