annotate clusterProfiler_bitr.R @ 1:90120121398f draft default tip

planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f-dirty
author kpbioteam
date Mon, 16 Jul 2018 06:25:51 -0400
parents e7a71e686f53
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
1 require("clusterProfiler", quietly = TRUE)
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
2 require("org.Hs.eg.db", quietly = TRUE)
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
3
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
4 args <- commandArgs(trailingOnly = TRUE)
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
5
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
6 input1 = args[1]
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
7 input2 = args[2]
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
8 input3 = args[3]
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
9 output = args[4]
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
10
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
11 gene <- c(read.table(input1))
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
12 gene.df = bitr(gene$V1, fromType=input2, toType=input3, OrgDb="org.Hs.eg.db")
e7a71e686f53 planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f
kpbioteam
parents:
diff changeset
13
1
90120121398f planemo upload for repository https://github.com/kpbioteam/clusterProfiler_bitr commit 470dccce41afc79ef1cc7a6722b50d0c258e0f4f-dirty
kpbioteam
parents: 0
diff changeset
14 write.table(gene.df, file= output, quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t")