Hi,

I was wondering if there is a possibility of marking genes of interest on the heatmap via `ComplexHeatmap` R package. Instead of specifying row numbers in` anno_mark` function, can we specify the gene list and mark on the  heatmap? For long gene list, it's bit challenging to identify the rownames of each gene and specify them. Thank you.

## Genes of interest
    genes_to_show = c('Gene_A', 'Gene_F', 'Gene_L', 'Gene_R', 'Gene_GG', 'Gene_ZZ', 'Gene_Test')
        
    
 ## Mark rownames
    ha = rowAnnotation(foo = anno_mark(at = c(1:4, 11, 28, 44,:47), 
            labels = rownames(m)) ## Mention gene list here "genes_to_show" instead of specifying row numbers

## This would work, but still need to specify row numbers

    ha = rowAnnotation(foo = anno_mark(at = c(1:4, 11, 28, 44,:47), 
                                       labels = genes_to_show))
    
  ## Plot heatmap
        Heatmap(m, name = "mat", cluster_rows = FALSE,  right_annotation = ha,
            row_names_side = "left", row_names_gp = gpar(fontsize = 4))
    
    

![](https://i.imgur.com/424cPpz.png)



Best Regards,

Mohammed
Use a combination of `which()` and `%in%` to isolate the row indices that match the gene character vector:

```
mark_at = which(rownames(m) %in% genes_to_show)

ha = rowAnnotation(foo = anno_mark(at = mark_at, labels = genes_to_show))
```

