This is a test version of Biostars. For the public version, visit https://www.biostars.org.
plotting pvalues from 2 data sets

Hello,

I have 2 datasets

1) GWAS summary stats with pvalues for a selected region

2) Expression data with pvalues for the same selected region

Both the datasets are in the following format in two columns and approx 2000-3000 rows chr:position pvalue

I want to visualize a scatter plot by overlaying the pvalues from both datasets and also include gene names (a plot that may look similar to locuszoom). I am not sure what packages would be appropriate for to generate such plots ?

Thank you.

pvalues plots

1 answer

I imagine that a combination of ggplot2 with Shiny would do the trick. This would allow you to pan and zoom nicely. If you don't actually need the interactive aspect and are fine with just looking at the graph in tiles (since otherwise you won't be able to visualize 2000-3000 labels meaningfully), then ggplot2 alone would work.

You might want to plot log10 p-value, btw.

and this would also annotate gene names to the plot ?

Annotating them is up to you, plotting them is then simple. Of course annotating regions isn't difficult assuming you have an annotation file somewhere.

great, many thanks... I'll give this a shot !

Log in to answer this question.