rdataframeupsetrupsetplotcomplex-upset

Error in upset_data : unused argument (nsets = 5) What could be causing this and how coul I fix the issue?


I am very new to R and I would like to make UpSet plot of peptides.

I have five lists (sets) in .txt format (ID_list_vysledok_pos_vs_healthy_files.txt, ID_list_vysledok_pos_neg_files.txt, ID_list_vysledok_New_vs_Old_collumn_files.txt, ID_list_vysledok_neg_vs_healthy_files.txt, ID_list_vysledok_Coated_vs_Liquid_junction_files.txt)

Each .txt file is just list of peptides in this format: List of peptides

I was following step by step instructions by this link : http://genomespot.blogspot.com/2017/09/upset-plots-as-replacement-to-venn.html

The code is working without problems until I want to make the graph with : upset(res2, nsets=5)

It gives me following error: Error in upset_data(data, intersect, mode = mode, encode_sets = encode_sets, : unused argument (nsets = 5)

The res2 dataframe looks like it should be looking to make this graph : View(res2)

I think the problem is trivial and sets may not be properly defined (but in the link I was following it is working), but I was not able to fix this...

I installed these libraries : library(plyr), library(reshape2), library(UpSetR)

Just to be sure I will provide the code (same as in link): Photo of code

Thank you for any suggestions.


Solution

  • It looks like you might be mixing up packages. You are trying to use upset_data function from ComplexUpset package, but passing nsets argument which works with upset from UpSetR package. I would recommend taking a closer look at which functions you use. If you want to use both UpSetR and ComplexUpset, you can distinguish them with ComplexUpset::upset and UpSetR::upset.