view clusterProfiler_go.R @ 3:7a6ba13c9381 draft

planemo upload for repository https://github.com/kpbioteam/clusterProfiler_go commit 19aa66aed9f704dc98680d2573ff7b13c81c0ca2-dirty
author kpbioteam
date Sun, 15 Jul 2018 10:40:01 -0400
parents 90ec56fa8e68
children 3d18046320ce
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", scale = 1)