Entering edit mode
Hi, I'm trying to find an easy way to have a shared annotation for rows and columns. right now i'm just creating the same data.frame for both of them.
ComplexHeatmap::Heatmap(correlation mat, cluster_rows = F, cluster_columns = F, col = viridis::viridis(n = 100,option = 'C'),
left_annotation = ComplexHeatmap::rowAnnotation(df = data.frame(
cell_type = clst_cell_type,
size = clst_sizes,
col=annot_colors),
top_annotation = ComplexHeatmap::columnAnnotation(df = data.frame(
cell_type = clst_cell_type,
size = clst_sizes,
col = annot_colors),
show_legend=c(F,F,F)),
)
Yes, you have to set them separately.
If you want to get rid of repeated coding, you can save the annotation data frame into an object first.