Closed fazeliniah closed 1 year ago
There is no special utility function. There are multiple ways to convert the list to input. For example, if you got phosphoproteomic readouts for 50 proteins:
proteins_measured = paste0('protein', seq(50))
head(proteins_measured)
[1] "protein1" "protein2" "protein3" "protein4" "protein5" "protein6"
And saw 20 up, 20 down, 20 with phospo site up and 20 with phospho down:
data = list(
protein_up=sample(proteins_measured, 20, TRUE),
protein_down=sample(proteins_measured, 20, TRUE),
phospho_up=sample(proteins_measured, 20, TRUE),
phospho_down=sample(proteins_measured, 20, TRUE)
)
You could convert the result using a two-liner:
membership = data.frame(sapply(
data,
function(significant_proteins) proteins_measured %in% significant_proteins)
)
rownames(membership) = proteins_measured
And plot it with:
upset(membership, colnames(membership))
Does it help?
I am going to close this one as answered. Please reopen if you have further questions on this topic. Thanks for trying complex-upset!
Thank you very much for developing this nice tool. I have been using the UpSetR package and would like to replace it with complex-upset. Here is an example, where I used UpSetR to generate the plot for 4 lists:
The lists are of varying length. Is there any easy way to prepare/convert this for complex-upset? Thanks H