Skip to content

Commit

Permalink
use internal data (KEGG.db)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaospecial committed Dec 8, 2020
1 parent 14203b5 commit 5a311dd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
Binary file added KEGG.db_1.0.tar.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions cache_KEGG_db.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# create local KEGG db
library(createKEGGdb)
createKEGGdb::create_kegg_db(species = c("eco","ppu"))
install.packages("KEGG.db_1.0.tar.gz", type = "source")
20 changes: 16 additions & 4 deletions gene-expression.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ deg1 <- do.call("rbind", DEG_results.EC) %>%
ck1 <- compareCluster(gene ~ ratio + time,
data = deg1,
fun = "enrichKEGG",
organism = "eco")
organism = "eco",
use_internal_data = TRUE)
p1 <- ck_plot(ck1)
p1 <- grid_panel_autoheight(p1)
Expand All @@ -526,7 +527,8 @@ deg2 <- do.call("rbind", DEG_results.PP) %>%
ck2 <- compareCluster(gene ~ ratio + time,
data = deg2,
fun = "enrichKEGG",
organism = "ppu")
organism = "ppu",
use_internal_data = TRUE)
p2 <- ck_plot(ck2)
p2 <- grid_panel_autoheight(p2)
Expand Down Expand Up @@ -565,13 +567,23 @@ get_genelist <- function(x){
### *E. coli* GSEA KEGG result
gseKEGG_results.EC <- lapply(gene_expression.EC, function(x){
geneList <- get_genelist(x)
tryCatch(gseKEGG(geneList, organism = "eco",nPerm = 10000,minGSSize = 10),error=function(e) NULL)
tryCatch(gseKEGG(geneList,
organism = "eco",
nPerm = 10000,
minGSSize = 10,
use_internal_data = TRUE),
error=function(e) NULL)
})
### *P. putida* GSEA KEGG result
gseKEGG_results.PP <- lapply(gene_expression.PP, function(x){
geneList <- get_genelist(x)
tryCatch(gseKEGG(geneList, organism = "ppu",nPerm = 10000,minGSSize = 10),error=function(e) NULL)
tryCatch(gseKEGG(geneList,
organism = "ppu",
nPerm = 10000,
minGSSize = 10,
use_internal_data = TRUE),
error=function(e) NULL)
})
```

Expand Down

0 comments on commit 5a311dd

Please sign in to comment.