heatmap.simple: Draw a simple heatmap from a matrix, with values written in...

Description Usage Arguments Details Value Author(s) Examples

Description

Draw a simple heatmap from a matrix, without any clustering or fancy features, but with the values written in the cells. This is a simple way to circumvent several difficulties with the heatmap() and heatmap.2() functions, which generate beautiful maps with many intersting features, which I generally spend a lot of time to disactivate.

Usage

1
2
3
4
5
heatmap.simple(x, main = NA, xlab = NA, ylab = NA,
  display.values = TRUE, text.color = "auto", col = gray.colors(256, start
  = 1, end = 0, gamma = 1), zlim = range(x, na.rm = TRUE),
  round.digits = NA, signif.digits = NA, auto.margins = TRUE, las = 2,
  cex.cells = 1, cex.axis.x = 1, cex.axis.y = 1, cex.lab = 1, ...)

Arguments

x

A matrix or data frame

...

Additional parameters are passed to the function image()

main=NA

Main title, passed to image()

xlab=NA

Label for X axis, passed to image()

ylab=NA

Label for Y axis, passed to image()

display.values=TRUE

Display the values on the cell.

text.color="black"

Color to write the values.

col=gray.colors(256,

start=1, end=0) Color map.

zlim=range(m)

passed to image()

round.digits=NA

If specified, values are rounded with the function round().

signif.digits=NA

If specified, values are rounded with the function signif().

las=2

orientation of the axis labels, type help(par) for details.

auto.margins=TRUE

define automatically the margin sizes with par("mar") depending on label lengths.

cex.cell=1

font magnification for the text displayed in the cells

cex.axis=1

font magnification for the axis text

cex.lab=1

font magnification for the axis labels

Details

First version: 2015-10 Last modification: 2015-10

Value

No return

Author(s)

Jacques van Helden (Jacques.van-Helden@univ-amu.fr)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Draw the heatmap of a Markov model of order 1 trained with the
##  whole Human genome.
## This example highlights the strong avoidance of the CpG dinucleottide.
org <- "Homo_sapiens_GRCh38"
m <- 1 ## Order of the Markov model
k <- m + 1 ## Length of oligomers used to estimate the parameters
transition.file <- system.file("extdata", 
  file.path("markov_models", org, 
      paste(sep="", k, "nt_genomic_", org, "-1str-ovlp_transitions.tab.gz")), 
      package = "stats4bioinfo")
markov.transitions <- read.delim(transition.file, comment=";", row.names=1)
heatmap.simple(markov.transitions[, c("a","c","g","t")], zlim=c(0,1),
   main=paste(org, "genomic Markov, order =", m), signif.digits=2,
   xlab="Suffix", ylab="Prefix", las=1)

jvanheld/stats4bioinfo documentation built on May 20, 2019, 5:16 a.m.