This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Correlogram under barplot

I have a gene sets, together with enrichment statistics, and the correlation of the gene set 'activity' within an expression dataset. I would like to visualize the enrichment statistics and correlations simultaneously. It may be possible to get snp.plotter to do this, but it's not exactly straightforward. It would be nice to do this programmatically, as opposed to editing the separate plots together post-hoc.

Input looks like


example.data.values <- data.frame(
  state=c('A', 'B', 'C', 'D'),
  statistic=c('3.14', '1.16', '0.28', '2.04')
)

example.data.corr <- data.frame(
  state1=c('A', 'A', 'A', 'B', 'B', 'C'),
  state2=c('B', 'C', 'D', 'C', 'D', 'D'),
  corr=c(0.38, 0.55, 0.57, 0.10, 0.35, 0.26)
)

Desired output: something like:

Edit: Note that this is a composite image constructed in powerpoint, not a single figure, which is the desired output.

img

ggplot2 r visualization

What about an UpSet plot? UpSetR package will do a similar plot and IMO much cleaner

An upset plot has (2^N - 1) bars, one for each possible intersection set. The statistics I have cannot be apportioned into the various intersections. Therefore, I want a specific plot to simultaneously display N points (enrichments) and (N choose 2) points (correlations / Jaccard).

It's not entirely clear to me what the issue is. Your toy example seems to give you what you want. Where's the hold up?

I had to construct my toy example by combining 2 separate plots. I want an automated process.

0 answers

No answers yet.

Log in to answer this question.