Closed xlucpu closed 3 years ago
I solved this by the following:
p <- oncoPrint(onco.input[mut.order,rownames(my_ann)],
alter_fun = alter_fun,
bottom_annotation = NULL,
top_annotation = NULL,
column_order = rownames(my_ann),
right_annotation = rowAnnotation(bar3 = right_anno), # use right annotation
#row_order = mut.order,
show_pct = T,
column_title = "",
show_heatmap_legend=T,
column_split = my_ann$Subtype,
column_title_gp = gpar(fontsize = 8),
row_names_gp = gpar(fontsize = 8),
column_names_gp = gpar(fontsize = 8))
Hi I am using ComplexHeatmap (2.5.5) to draw an OncoPrint with several annotations. It works perfectly in column and bottom annotations but I met troubles in right annotations.
I made an example to reproduce my "error" here and you could see the right anotation barplot is different from using draw() and rowAnnotation() in oncoPrint(). The right annotation here is a stacked percentage barplot and presented incorrectly within the oncoPrint.
Call for help, many thanks advanced!