view clusterProfiler_go.R @ 2:90ec56fa8e68 draft

planemo upload for repository https://github.com/kpbioteam/clusterProfiler_go commit 19aa66aed9f704dc98680d2573ff7b13c81c0ca2-dirty
author kpbioteam
date Sun, 15 Jul 2018 10:27:55 -0400
parents 49ae9762eb96
children 7a6ba13c9381
line wrap: on
line source

require("clusterProfiler", quietly = TRUE)
require("DO.db", quietly = TRUE)
require("org.Hs.eg.db", quietly = TRUE)
require("ggplot2", quietly = TRUE)


args <- commandArgs(trailingOnly = TRUE)

input1 = args[1]
output1 = args[2]
output2 = args[3]

gene <- read.table(input1)
ego <- enrichGO(gene          = c(gene$V1),
                keyType = "ENTREZID",
                OrgDb         = org.Hs.eg.db,
                ont           = "BP",
                pAdjustMethod = "BH",
                pvalueCutoff  = 0.01,
                qvalueCutoff  = 0.05,
                readable      = TRUE)                

write.table(ego, output1)
dotplot(ego)
ggsave(file = output2, device = "pdf", width=5, height=6, dpi=100)