plot.DesignContrast: Plot a DesignContrast object with two heatmaps

View source: R/DesignContrast.R

plot.DesignContrastR Documentation

Plot a DesignContrast object with two heatmaps

Description

The function plots a ComplexHeatmap containing two matrices, one of the design matrix and the other of the contrast matrix.

Usage

## S3 method for class 'DesignContrast'
plot(
  x,
  y = NULL,
  title = NULL,
  clusterDesign = FALSE,
  clusterSamples = FALSE,
  clusterContrasts = FALSE,
  ...
)

Arguments

x

A DesignContrast object

y

NULL, ignored

title

Title of the object, used in the title of the heatmaps

clusterDesign

Logical, cluster rows of the design matrix

clusterSamples

Logical, cluster columns of the design matrix

clusterContrasts

Logical, cluster rows of the contrast matrix (notice that the contrast matrix required by limma is the transposed contrast matrix)

...

Other parameters passed to Heatmap

Value

Heatmap object

Examples

myFac <- gl(3,3, labels=c("baseline", "treat1", "treat2"))
myDesign <- model.matrix(~myFac)
colnames(myDesign) <- c("baseline", "treat1", "treat2")
myContrast <- limma::makeContrasts(contrasts=c("treat1", "treat2"), levels=myDesign)
res1 <- DesignContrast(myDesign, myContrast, groups=myFac)
res2 <- DesignContrast(myDesign, myContrast, groups=myFac, dispLevels=c("C", "T1", "T2"))
plot(res1, title="DesCon 1")
plot(res2, title="DesCon 1 (identical)")

bedapub/ribiosExpression documentation built on Sept. 2, 2023, 4:37 a.m.