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

I performed LRT test for my RNAseq data and I obtained some clusters. I performed enrichement analysis using ClusterProfile packasge (enricher, groupGO, enrichKEGG ecc) and i wanted to plot my results through barplot() function.

ggo <- list(BP = list(),

            CC = list(),

            MF = list())


for (go in names(ggo)) {

  for (i in names(clusters_list)) {

    ggo[[go]][[i]] <-(groupGO(gene= myset[[i]]$ENTREZID,

                                            OrgDb    = org.Hs.eg.db,

                                            ont      = go,

                                            level    = 8,

                                            readable = TRUE))

  }

  png(filename = paste0("GroupGO_plot/GroupGO_",go,"_lvl8.png"), width = 12, height = 9, 
units = "in", res = 300)

  barplot(ggo[[go]], drop = TRUE)

  ggo[[go]] <- as.data.frame(ggo[[go]])

  write.xlsx(x = ggo[[go]], file = paste0("GroupGO_",go,"_lvl8.xlsx"), asTable = T)

}

I want to show categories with high number of genes or padjust as order (from higher to lower). How can I plot in this way? Any suggestions? Thanks in advance

clusterprofile barplot rnaseq deseq2

0 answers

No answers yet.

Log in to answer this question.