Commit 351a906d authored by Lena Hersemann's avatar Lena Hersemann

devtools functions to reload dplyr package; command to stop script if no enriched terms were found

parent 83be95a6
......@@ -116,7 +116,8 @@ glMappedRaw <- clusterProfiler::bitr(unique(geneLists$ensembl_gene_id), fromType
unloadNamespace('clusterProfiler')
#load_pack(clusterProfiler)
reload_dplyr()
devtools::reload(devtools::inst("dplyr"))
# reload_dplyr()
glMapped <- glMappedRaw %>%
select(- ensembl_gene_id) %>%
......@@ -148,6 +149,8 @@ glMapped %<>% filter(! is.na(entrez_gene_id))
enrResults <- quote(glMapped %>% do(cp_test(.$entrez_gene_id, annoDb, cp_species, q_cutoff = q_cutoff))) %>%
cache_it(paste0("enrdata_", digest(glMapped)))
# stop script if no enriched terms were found
if(nrow(enrResults) == 0) {stop("No enriched terms found")}
# add information on GO levels:
load_pack(clusterProfiler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment