使UpSet函数在条形上方显示数字

时间:2019-03-01 13:15:57

标签: r heatmap

我正在使用ComplexHeatmap包来表示不同GRanges之间的交集。小插图有一些很好的示例来绘制它:

library(circlize)
library(ComplexHeatmap)
library(GenomicRanges)
lt2 = lapply(1:4, function(i) generateRandomBed())
lt2 = lapply(lt2, function(df) GRanges(seqnames = df[, 1], 
    ranges = IRanges(df[, 2], df[, 3])))
names(lt2) = letters[1:4]
m = make_comb_mat(lt2)
UpSet(m)

enter image description here

非常方便。但是,UpSet函数不会在每个小节上方绘制交点号,例如upset包中的姐妹函数UpSetR

library('UpSetR')
movies <- read.csv( system.file("extdata", "movies.csv", package = "UpSetR"), 
                    header=T, sep=";" )

require(ggplot2); require(plyr); require(gridExtra); require(grid);

upset(movies, 
      sets = c("Action", "Comedy", "Drama"), 
      order.by="degree", matrix.color="blue", point.size=5,
      sets.bar.color=c("maroon","blue","orange"))

enter image description here

upset函数不允许m对象。因此,我想我需要使用UpSet。但是,有人可以帮我把电话号码弄到条子上方吗?我找不到容易绘制的参数,甚至找不到内部函数如何定义它的参数。我将不胜感激。

0 个答案:

没有答案