This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to visualize GSEA results in a graph using R

Hi everyone, I'm new with bioinformatics. I just ran the GSEA analysis for different conditions and now I want to visualize the results plotting them in a graph together that shows the NES like a circle. The size of the circle should be proportional to the FDR and the color should be red if NES is negative or green if the NES is positive. How can I do?

Thanks Francesca

rna-seq r gsea

stop screaming. 20char

Please provide representative output, with just words it is difficult to imagine what you aim to plot.

2 answers

ggplot2 R packages can plot the figure, like this :ggplot(pathway, aes(x=NES, y=Pathway, size=FDR,color=-1*log10(FDR))) + geom_point()+scale_size_area(max_size = 5)+scale_colour_gradient(low="green",high="red")

Sorry if I reply just now, but I had some problems. I want to thank you because your solution worked well. I just had to adjust something. The script that was good for me was this one : ggplot(pathway, aes(x="Name of sample", y=Pathway, size=FDR,color=NES)) + geom_point()+scale_size_area(max_size = 5)+scale_colour_gradient(low="green",high="red") Thanks to you and to all the others who replied!

Have a look at the igraph package and this tutorial on network visualization with R which uses igraph.

Log in to answer this question.