尝试绘制 UpSetR 并出现错误

Trying to plot UpSetR and getting an error

我有一个如下所示的脚本:

library("UpSetR")

Data<- read.table(file=file.choose(), header=T,  fill = TRUE);
Data <- as.data.frame(Data);
head(Data);

GEO<- colnames(Data);

upset(Data, sets = GEO, nsets = 6);

数据如下所示:

'data.frame':   6228 obs. of  6 variables:
 $ GSE144725_CHD10: Factor w/ 6228 levels "1-Mar","11-Sep",..: 1766 3229 5321 3234 3776 1026 5001 4706 4752 5349 ...
 $ GSE115310_C9   : Factor w/ 333 levels "ABHD13","ACAT2",..: 1 2 3 4 5 6 7 8 9 10 ...
 $ GSE115310_sALS : Factor w/ 283 levels "AASDHPPT","ABHD13",..: 2 5 6 13 19 23 24 28 36 45 ...
 $ GSE68240_sALS  : Factor w/ 1586 levels "A1BG","AAAS",..: 392 357 686 704 718 203 731 1424 737 495 ...
 $ GSE28253_sALS  : Factor w/ 53 levels "ANAPC4","ARMC5",..: 12 20 48 4 41 14 1 18 24 44 ...
 $ GSE833_sALS    : Factor w/ 78 levels "ADCY1","AKAP13",..: 32 28 66 53 9 29 69 65 37 34 ...

我的错误:

Error in start_col:end_col : argument of length 0

我想获取数据和与数据关联的每一列,并制作一个 UpSet 图来查找重叠。任何帮助将不胜感激。每列的因子重要吗?

我认为你的数据集不是 0/1 队形,你可以尝试将你的数据转换为 0/1 像这样 Data[Data > 0] <- 1.

希望有用!