rupsetr

Trying to plot UpSetR and getting an error


I have a script that looks like this:

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 looks like this:

'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 ...

My error:

Error in start_col:end_col : argument of length 0

I am wanting to take Data and each column associated with Data and make a UpSet plot to find overlap. Any help would be greatly appreciated. Does Factor on each column matter?


Solution

  • I think your dataset is not the 0/1 formation, you could try to convert your data to 0/1 like this Data[Data > 0] <- 1.

    I hope it works!