View source: R/DesignContrast.R
plot.DesignContrast | R Documentation |
The function plots a ComplexHeatmap containing two matrices, one of the design matrix and the other of the contrast matrix.
## S3 method for class 'DesignContrast'
plot(
x,
y = NULL,
title = NULL,
clusterDesign = FALSE,
clusterSamples = FALSE,
clusterContrasts = FALSE,
...
)
x |
A |
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 object
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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.