Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/getEnrichrdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ getEnrichrdb <- function(org = c('human','fly','yeast','worm','zebrafish'),
res[[i]] = suppressWarnings(fst::read.fst(destfile))
}

res[['geneset_name']] <- NA
res[['geneset_name']] <- data.frame(term = character(0), name = character(0), stringsAsFactors = FALSE)

#--- add org for other use ---#
ensOrg_name <- ensOrg_name_data()
Expand Down
2 changes: 1 addition & 1 deletion R/getHgDisease.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ getHgDisease <- function(source = c('do','disgenet','ncg_v7','ncg_v6','covid19')
data_dir, web_f_size, local_f_size)
res[[i]] = suppressMessages(fst::read.fst(destfile))
}else{
res[['geneset_name']] <- NA
res[['geneset_name']] <- data.frame(term = character(0), name = character(0), stringsAsFactors = FALSE)
}

#--- add org for other use ---#
Expand Down
4 changes: 2 additions & 2 deletions R/getKEGG.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ getKEGG <- function(org = 'hsa',

# category <- tolower(category)
if(category %in% c('disease','drug','network') & org != 'hsa'){
stop(paste0('The categoty "',category, '" only support human...'))
stop(paste0('The category "',category, '" only supports human...'))
}

if(is.null(data_dir)){
Expand All @@ -41,7 +41,7 @@ getKEGG <- function(org = 'hsa',
for(i in c("geneset","geneset_name")){
# i = 'geneset'
url <- paste0(web.url(),sub_dir,category,'/',org,"_",i,".fst")
destfile <- paste0(data_dir, "/", org, "_",i,".fst")
destfile <- paste0(data_dir, "/", org, "_", category, "_", i, ".fst")
web_f_size <- check_web_size(url)
local_f_size <- file.size(destfile)
if(is.na(local_f_size)) local_f_size = 0
Expand Down
2 changes: 1 addition & 1 deletion R/getMsigdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ getMsigdb <- function(org = 'human',
#------------------------------#
res <- list()
res[["geneset"]] <- geneset
res[["geneset_name"]] <- NA
res[["geneset_name"]] <- data.frame(term = character(0), name = character(0), stringsAsFactors = FALSE)

# Add organism for other use, preserving the original output behavior.
ensOrg_name <- ensOrg_name_data()
Expand Down
7 changes: 4 additions & 3 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,11 @@ geneset_download <- function(url, destfile, data_dir,

if (!ok) {
if (!local_exists) {
message(
"No valid local cache is available.\n",
stop(
"Download failed and no local cache is available.\n",
"Please download manually via: ", url, "\n",
"Then save to: ", destfile
"Then save to: ", destfile,
call. = FALSE
)
}
return(invisible(FALSE))
Expand Down