hms-dbmi / UpSetR

An R implementation of the UpSet set visualization technique published by Lex, Gehlenborg, et al..
https://cran.rstudio.com/web/packages/UpSetR
Other
753 stars 153 forks source link

(Error)Intersection or set may not be present in data set. Please refer to matrix. #221

Open hsinjou0714 opened 3 years ago

hsinjou0714 commented 3 years ago

Hi, I am trying to plot with UpsetR with a data that look like this image I would like to make the query based on Swarming columns, and red for 1, blue for 0 as a stacked barplot in UpSetR, but then it told me "Error in [.data.frame(temp_data, , start_col:new_end) : undefined columns selected In addition: Warning message: In func(query, ...) : Intersection or set may not be present in data set. Please refer to matrix."

Following is my code: Any suggestions? upset(pa14, mainbar.y.label = "Number of strains", sets.x.label = "Strain numbers", query.legend = "top", queries = list( list(query = elements, params = list("Swarming", c(0,1)), color = "red", active = T,query.name = "High Swarming"), list(query = elements, params = list("Swarming", c(0)), color = "blue", active = T,query.name = "Low Swarming") ))