This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plot GSEA software results into R

Hello,

I have load 2 tsv files from GSEA analysis (upregulated and downregulated pathways) to R, and I would like to plot the results like a dotplot, using ggplot or cluster profiler. Is it possible?

Otherwise, I also have an excel with a list of differentially expressed genes between my groups, log2foldchange and p-value. Is it possible to make a GSEA analysis with this data and then plot it?

Thank you!!

profiler dotplot r gsea cluster

Without seeing your data it is difficult to comment on how to generate dotplots. I would recommend ggplot2 though. Otherwise you can follow the tutorial of Clusterprofiler and make it work for your gene list data - https://bioconductor.org/packages/release/bioc/html/clusterProfiler.html which is a good tool for creating gene enrichment type plots. You may also wish to have a background list of genes ready if you want to use Clusterprofiler.

My gene list is an excel with the following columns: name of gene, log2foldchange, p-value. I have tried to use enrichGo() on this data, but the results don't make biologycal sense.

My code is:

organism = "org.Mm.eg.db" BiocManager::install(organism, character.only = TRUE, force = TRUE) library(organism, character.only = TRUE)

df <- read_excel("C:/Users/u-ugc/Desktop/Mireia - ESC/GSEA Analysis/ranked15.xlsx", sheet = "Sheet1")

sig_genes_df = subset(df, pvalue < 0.05)

genes <- sig_genes_df$log2foldchange

names(genes) <- sig_genes_df$name

genes <- na.omit(genes)

genes <- names(genes)[abs(genes) > 2]

go_enrich <- enrichGO(gene = genes, universe = names(gene_list), OrgDb = organism, keyType = 'SYMBOL', readable = F, ont = "BP", pvalueCutoff = 0.5, qvalueCutoff = 0.5)

dotplot(go_enrich)

0 answers

No answers yet.

Log in to answer this question.