heatmap.annotation | R Documentation |
Only draw annotation
heatmap.annotation(
group = NULL,
annotation.df = NULL,
annotation.color = NULL,
sort.group = TRUE,
title = "",
group.color = "aaas",
group.prefix = "",
column_split = TRUE
)
annotation.df |
Column is variable, row is sample |
annotation.color |
A list object, the name should be corresponded to df column names |
sort.group |
Order the group |
column_split |
Default TRUE |
set.seed(111)
group = sample(c(1,2),10,replace = T)
annotation.df = data.frame(Gender = sample(c("Male","Female"),10,replace = T),
Age = runif(10, min=50, max=80),
stringsAsFactors = FALSE)
#Gender.col = loonR::get.palette.color("aaas",2)
#names(Gender.col) = unique(annotation.df$Gender)
Gender.col = c("Male"="blue", "Female"="red")
col_fun = circlize::colorRamp2(c(50, 100), c("blue", "red")) # continuous variable
annotation.color = list(Gender=Gender.col, Age=col_fun)
loonR::heatmap.annotation(group = group, annotation.df = annotation.df,
annotation.color = annotation.color, sort.group = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.