英文:
Rotate annotation in Upset plot of complex heatmap package
问题
I want to show the numbers of the bars in the top annotation barplot in the Upset plot of ComplexHeatmap. However, I could only find parameters to rotate the name of the annotations, but not the annotations themselfes.
Taken from the ComplexHeatmap Documentation:
lt = list(set1 = c("a", "b", "c"),
set2 = c("b", "c", "d", "e"))
x = list_to_matrix(lt, universal_set = letters)
m2 = make_comb_mat(x)
m2 = m2[comb_degree(m2) > 0]
UpSet(m2, top_annotation = upset_top_annotation(m2, add_numbers = T))
Is there a way to not have the numbers rotated by 45 degrees?
英文:
I want to show the numbers of the bars in the top annotation barplot in the Upset plot of ComplexHeatmap. However, I could only find parameters to rotate the name of the annotations, but not the annotations themselfes.
Taken from the ComplexHeatmap Documentation:
lt = list(set1 = c("a", "b", "c"),
set2 = c("b", "c", "d", "e"))
x = list_to_matrix(lt, universal_set = letters)
m2 = make_comb_mat(x)
m2 = m2[comb_degree(m2) > 0]
UpSet(m2, top_annotation = upset_top_annotation(m2, add_numbers = T))
Is there a way to not have the numbers rotated by 45 degrees?
答案1
得分: 4
numbers_rot = 0
可以添加到upset_top_annotation
中。
anno_barplot
文档中有更多选项,可以查看?anno_barplot
。
英文:
You can do this by adding numbers_rot = 0
to the upset_top_annotation
.
lt = list(set1 = c("a", "b", "c"),
set2 = c("b", "c", "d", "e"))
x = list_to_matrix(lt, universal_set = letters)
m2 = make_comb_mat(x)
m2 = m2[comb_degree(m2) > 0]
UpSet(m2, top_annotation = upset_top_annotation(m2, add_numbers = T, numbers_rot = 0))
This option is somewhat hidden in the documentation, as it is not a parameter for upset_top_annotation
, but gets passed to the anno_barplot
. You can find more options to pass by looking at ?anno_barplot
Hope this helps!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论