Skip to content

anno_block() labels don't match split class labels #1256

@frederikziebell

Description

@frederikziebell

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
)
Image

Is this a bug? I'm using ComplexHeatmap 2.24.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions