Description Usage Arguments Value Author(s) Examples
View source: R/ggheatmap_anno_sample.R
Draw a heatmap of the grouped samples, and add group information to the result of ggheatmap
1 |
data |
a data.frame containg the samples information and the grouping information |
a ggplot2 type of heatmap containing only one row
Zhonghui Gai
1 2 3 4 5 6 7 8 | data <- rowname_to_col(iris)
data <- data[,-6]
data$samples <- factor(data$samples, levels = data$samples)
p <- ggheatmap(data = data, midpoint = 2, scale = TRUE)
anno.samples <- data.frame(group = iris$Species,
samples = data$samples)
p.sample <- ggheatmap_anno_sample(data = anno.samples) + ggsci::scale_fill_jama()
p %>% aplot::insert_top(p.sample, height = 0.01)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.