gpt4 book ai didi

r - 心烦意乱的地 block 交点数问题

转载 作者:行者123 更新时间:2023-12-04 15:05:00 24 4
gpt4 key购买 nike

我有如下四组 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)

enter image description here

但我对查看特定集合之间的交集很感兴趣。 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)

enter image description here

但是,A 和 B 的公共(public)点是 4,A 和 C 是 4,A 和 D 是 3。为什么上面的翻转图显示错误的数字?

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

最佳答案

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

有不同的方法来计算集合交集大小:

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

UpSetR 使用“distinct”模式。

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

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

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

enter image description here

关于r - 心烦意乱的地 block 交点数问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66323268/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com