heatmap3 (version 1.1.1)

showAnn: showAnn

Description

The function showAnn is an example for generating annotation figure in the result of heatmap3 function. You can use your any plot functions to generate your own annotation figure.

Usage

showAnn(annData)

Arguments

annData

a data frame contains the annotation information for samples. It can only contain factor or numeric variables, and each row reprezent a sample with the same order of the columns in expression matrix.

Examples

Run this code
# NOT RUN {
annData<-data.frame(mtcars[,c("mpg","am","wt","gear")])
annData[,2]<-as.factor(annData[,2])
annData[,4]<-as.factor(annData[,4])
#Display annotation
# }
# NOT RUN {
showAnn(annData)
# }
# NOT RUN {
#Heatmap with annotation
heatmap3(t(mtcars),ColSideAnn=annData,ColSideFun=function(x)
showAnn(x),ColSideWidth=1.2,balanceColor=TRUE)
# }

Run the code above in your browser using DataCamp Workspace