-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
The downloadGEObedFiles() code provided by the author here has an issue because the GEO server may no longer support * * FTP * * access. It is recommended to use * * HTTPS * * instead. Therefore, I have made modifications to the code and created a new function,downloadGEObedFilesHTTPS ()
downloadGEObedFilesHTTPS <- function(genome,destDir) {
#Obtaining genomic information
info <- getGEOInfo(genome)
#Get supplementary_file column
fnames <- as.character(info$supplementary_file)
#Replace FTP with HTTPS
fnames_https <- gsub("^ftp://", "https://", fnames)
#Generate target file path
destfiles <- sub(".*\\/", paste0(destDir, "/"), fnames_https)
names(destfiles) <- NULL
#Traverse and download files
for (i in seq_along(fnames_https)) {
if (!file.exists(destfiles[i])) {
tryCatch(
download.file(fnames_https[i], destfile = destfiles[i], mode = "wb"),
error = function(e) message(fnames_https[i], ": file not found and skip")
)
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels