When using anno_bloc(), I can't get the block labels to match the class labels of the split vector. Here's some example code:
set.seed(123)
mat <- matrix(rnorm(100), ncol = 10)
rownames(mat) <- paste0(rep(LETTERS[1:5], 2), rep(c(1,2), each = 5))
class <- rep(LETTERS[1:5], 2)
n_class <- length(unique(class))
row_anno <- rowAnnotation(
foo = anno_block(gp = gpar(fill = 2:(n_class+1)), labels = unique(class))
)
Heatmap(
mat,
row_split = class,
left_annotation = row_anno
)
Is this a bug? I'm using ComplexHeatmap 2.24.0.