Correlogram under barplot
0
0
Entering edit mode
2.3 years ago
LChart 4.6k

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 • 914 views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2516 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6