心烦意乱的地块交点数问题

Problem with upset plot intersection numbers

我有如下四组 A、B、C 和 D:

A <- c("ENSG00000103472", "ENSG00000130600", "ENSG00000177335", "ENSG00000177337", 
"ENSG00000178977", "ENSG00000180139", "ENSG00000180539", "ENSG00000187621", 
"ENSG00000188511", "ENSG00000197099", "ENSG00000203446", "ENSG00000203739", 
"ENSG00000203804", "ENSG00000204261", "ENSG00000204282", "ENSG00000204584", 
"ENSG00000205056", "ENSG00000205837", "ENSG00000206337", "ENSG00000213057")

B <- c("ENSG00000146521", "ENSG00000165511", "ENSG00000174171", "ENSG00000176659", 
"ENSG00000179428", "ENSG00000179840", "ENSG00000180539", "ENSG00000204261", 
"ENSG00000204282", "ENSG00000204949", "ENSG00000206337", "ENSG00000223534", 
"ENSG00000223552", "ENSG00000223725", "ENSG00000226252", "ENSG00000226751", 
"ENSG00000226777", "ENSG00000227066", "ENSG00000227260", "ENSG00000227403")

C <- c("ENSG00000167912", "ENSG00000168405", "ENSG00000172965", "ENSG00000177234", 
"ENSG00000177699", "ENSG00000177822", "ENSG00000179428", "ENSG00000179840", 
"ENSG00000180139", "ENSG00000181800", "ENSG00000181908", "ENSG00000183674", 
"ENSG00000189238", "ENSG00000196668", "ENSG00000196979", "ENSG00000197301", 
"ENSG00000203446", "ENSG00000203999", "ENSG00000204261", "ENSG00000206337")

D <- c("ENSG00000122043", "ENSG00000162888", "ENSG00000167912", "ENSG00000176320", 
"ENSG00000177699", "ENSG00000179253", "ENSG00000179428", "ENSG00000179840", 
"ENSG00000180539", "ENSG00000181800", "ENSG00000185433", "ENSG00000188511", 
"ENSG00000189238", "ENSG00000197301", "ENSG00000205056", "ENSG00000205562", 
"ENSG00000213279", "ENSG00000214922", "ENSG00000215533", "ENSG00000218018")

upset 情节给了我以下结果:

library(UpSetR)
mine <- list("A" = A,
             "B" = B,
             "C" = C,
             "D" = D)

upset(fromList(mine), keep.order = TRUE)

但我对查看特定集合之间的交集很感兴趣。 A & B, A & C, A & D。所以,我这样做如下:

upset(fromList(mine), intersections = list(list("A"),list("B"),list("C"),
                                           list("D"),list("A", "B"), 
                                           list("A", "C"),
                                           list("A", "D")), keep.order = TRUE)

但是,A&B的公共点是4,A&C是4,A&D是3。为什么上面的打乱图显示错误的数字?

如何让它正确显示正确的公共号码?我不想要所有集合之间的共同点。

数字正确!这个问题非常具体和复杂。

计算集合交集大小的方法有多种:

  1. “独特”模式
  2. “相交”模式
  3. “联盟”模式

UpSetR 使用“不同”模式。

“交叉”模式可能是用户所期望的。

ComplexHeatmap 和 ComplexUpset 包允许用户选择要使用的模式。

我在这里找到了 Jakob Rosenthal 的充分解释 https://github.com/hms-dbmi/UpSetR/issues/72 尤其是这张图: