Closed ttz12 closed 3 years ago
There is not currently a way to modify the order. Unfortunately you'd have to dig into the code a bit.
labels <- names(sort(table(unlist(multihyp_dfs)), decreasing=TRUE))
if (!is.null(top)) labels <- head(labels, top)
Right now, when using merge=TRUE
, hypeR will try to show the most frequently significant (above some cutoff) genesets across signatures. I chose this sorting method because I thought it would be more useful to see the differences in genesets present across signatures, starting with genesets significantly enriched across the most signatures.
Although alternative sorting methods could be a potential feature in the future.
Hi, I’m wondering if there is a way to modify the dot plot function for multiple signatures in HypeR so that regardless how many terms you’re plotting, it chooses the most significant ones first? Right now, it seems to make an arbitrary cutoff without pre-ranking for significance, e.g. here is the same object plotted using top = 10 and top = 20 as arguments:
hyp_dots(multhyp, top = 10, abrv=100, fdr = 0.005, pval = 1, merge=TRUE)
hyp_dots(multhyp, top = 20, abrv=100, fdr = 0.005, pval = 1, merge=TRUE)
it seems that it would be a great function if when I want to plot only 10 terms, GO_CELLULAR_RESPIRATION would make the list, but GO_AEROBIC_RESPIRATION wouldn't. Thank you!