barplot for enrichment results
0
0
Entering edit mode
3.1 years ago

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 • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 1997 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