使用 rsid 值绘制两个数据集之间的重叠

plot overlap between two datasets using rsid value

我想绘制两个数据集之间的重叠部分。 我的第一个数据集是: dput(rsid_en_vcf[1:43,]) c("rs782629217", "rs782403204", "rs199529001", "rs147880041", "rs141826009", "rs199826048", "rs200558688", "rs782114919", "rs41304577", "rs200311430", "rs147114528", "rs200635479", "rs41288741", "rs782167952", "rs6560827", "rs200242637", "rs144539776", "rs41305669", "rs41288743", "rs41288743", "rs369736529", "rs148025238", "rs41298226", "rs782272071", "rs9329304", "rs9329305", "rs137895574", "rs142619172", "rs144154384", "rs782777737", "rs782796368", "rs782443786", "rs782246853", "rs150779790", "rs782304204", "rs9329306", "rs144740103", "rs4431953", "rs189892388;rs75953774", "rs61839057", "rs61839058", "rs145405488", "rs782307404")

我的第二个数据集是:

dput(en_Brain_Cortex7[1:10,]) 结构(列表(RSID1 = c(“rs2085346”,“rs12765102”,“rs11250286”, "rs1876899", "rs11250293", "rs4880776", "rs7094850", "rs883660", "rs4880780", "rs4880487"), row.names = c(NA, -10L), class = c("tbl_df", "tbl", "data.frame")) 我想为这两个数据集绘制一个重叠的文图。 这就是我所做的:

venn.diagram(
    x = list(rsid_en_vcf,en_Brain_Cortex7),
    category.names = c("elasticnet_model","rsid_vcf"),
    filename = 'venn_diagramm.png',
    output=TRUE
)

但是报错: 错误: !必须使用有效的下标向量对行进行子集化。 i 逻辑下标必须匹配索引输入的大小。 x 输入的大小为 157608,但下标 !duplicated(x, fromLast = fromLast, ...) 的大小为 0.

帮助页面说 x 参数的输入应该是向量列表。你的 x 是一个向量和一个 data.frame.

这成功了:

library(VennDiagram)
venn.diagram(
+     x = list(rsid_en_vcf,en_Brain_Cortex7$RSID1),
+     category.names = c("elasticnet_model","rsid_vcf"),
+     filename = 'venn_diagramm.png',
+     output=TRUE
+ )
[1] 1

图像文件是 png 类型,但大小为 36 MB,因此拒绝上传。

Your image is too large to upload (over 2 MiB).

将分辨率更改为 72 并将 ht 和宽度更改为 700 我得到: