Technical Specs:
- Working on an HPC that is Linux
- My machine is a Mac Air
- I am using an R Markdown
- My R version is 4.2.2
I am using the following libraries:
library("limma")
library("minfi")
library("RColorBrewer")
library("missMethyl")
library("Gviz")
library("DMRcate")
library("stringr")
library("mCSEA")
library("IlluminaHumanMethylationEPICmanifest")
My basic code used before I encountered the code with an error is below
targets <- read.metharray.sheet(Directory, pattern = "My_Targets_File.csv")
RGset <- read.metharray.exp(targets = targets)
detP <- detectionP(RGset)
head(detP)
GRset <- preprocessFunnorm(RGset)
m <- getM(GRset)
The DMRcate manual (https://bioconductor.org/packages/devel/bioc/vignettes/DMRcate/inst/doc/DMRcate.pdf) suggests that probes that are close to SNPs should be filtered out.
My code that generated a rather annoyingly reoccurring error is below:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05)
It give the following error:
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE' If offline, please also see BiocManager vignette section on offline use
snapshotDate(): 2023-01-20
Error: File not previously downloaded. Run with 'localHub=FALSE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- eh[["EH3130"]]
- eh[["EH3130"]]
- .local(x, i, j = j, ...)
- stop("File not previously downloaded.\n", " Run with 'localHub=FALSE'", . call. = FALSE)
I do not need the ExperimentalHub as I have my own data from EPIC 2.0. What can I do to navigate around this error/correct my code? And why is the snapshot date Jan 20,2023 - its Feb 4th?
When I try to use the localHub = TRUE argument this happens:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05, localHub= TRUE)
It gives me the error:
Error in rmSNPandCH(m, dist = 2, mafcut = 0.05, localHub = TRUE): unused argument (localHub = TRUE) Traceback:
If I try LocalHub = FALSE:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05, localHub= FALSE)
I get the following error:
Error in rmSNPandCH(m, dist = 2, mafcut = 0.05, localHub = FALSE): unused argument (localHub = FALSE) Traceback
I am using R - 4.2.2 and the latest version of DMRcate. I have reinstalled DMRcate and specifically rmSNPandCH.
Then I added the library for ExperimentHub to the list of libraries:
library("ExperimentHub")
However then when I ran the command:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05)
I still get the following error:
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE' If offline, please also see BiocManager vignette section on offline use
snapshotDate(): 2023-01-20
Error: File not previously downloaded. Run with 'localHub=FALSE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- eh[["EH3130"]]
- eh[["EH3130"]]
- .local(x, i, j = j, ...)
- stop("File not previously downloaded.\n", " Run with 'localHub=FALSE'", . call. = FALSE)
Then I tried with localHub = TRUE:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05, localHub=TRUE)
However, I got the following error:
Error in rmSNPandCH(m, dist = 2, mafcut = 0.05, localHub = TRUE): unused argument (localHub = TRUE) Traceback:
Then, I tried with localHub = FALSE:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05, localHub=FALSE)
Sadly, I then got the error below:
Error in rmSNPandCH(m, dist = 2, mafcut = 0.05, localHub = FALSE): unused argument (localHub = FALSE)
Traceback:
I also tried loading the library for DMRcate data in case that would help however, that didn't seem to stop the same error that has been plaguing me:
Code used:
library("DMRcatedata")
Error:
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE' If offline, please also see BiocManager vignette section on offline use
snapshotDate(): 2023-01-20
Error: File not previously downloaded. Run with 'localHub=FALSE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- eh[["EH3130"]]
- eh[["EH3130"]]
- .local(x, i, j = j, ...)
- stop("File not previously downloaded.\n", " Run with 'localHub=FALSE'", . call. = FALSE)
Forcing a re-install did not make the error go away:
BiocManager::install("DMRcate", force = TRUE)
Proxy Related Code (try):
I also tried the proxy related commands detailed in this link: https://support.bioconductor.org/p/132864/
However, it did not work.
Attempt 1:
library(ExperimentHub)
library(httr)
setExperimentHubOption("PROXY", "my_proxy")
proxy = getExperimentHubOption("PROXY")
GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3", proxy="my_proxy")
Attempt 1 Error:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached: [experimenthub.bioconductor.org] Connection timed out after 10000 milliseconds Traceback:
- GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3", . proxy = "my_proxy")
- request_perform(req, hu$handle$handle)
- request_fetch(req$output, req$url, handle)
- request_fetch.write_memory(req$output, req$url, handle)
- curl::curl_fetch_memory(url, handle = handle)
Attempt 2:
GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3")
Attempt 2 Error:
Error in curl::curl_fetch_memory(url, handle = handle): Timeout was reached: [experimenthub.bioconductor.org] Connection timed out after 10001 milliseconds Traceback:
- GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3")
- request_perform(req, hu$handle$handle)
- request_fetch(req$output, req$url, handle)
- request_fetch.write_memory(req$output, req$url, handle)
- curl::curl_fetch_memory(url, handle = handle)
Attempt 3:
setExperimentHubOption("PROXY","my_proxy")
Sys.setenv(EXPERIMENT_HUB_PROXY = Sys.getenv("my_proxy"))
Then I ran:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05)
Attempt 3 Error:
Assuming valid proxy connection through 'my_proxy' If you experience connection issues consider using 'localHub=TRUE'
Warning message: "Could not check database for updates. Database source currently unreachable. This should only be a temporary interruption. Using previously cached version." Error in value[3L]: failed to connect reason: Failed to connect to bioconductor.org port 443: Connection timed out Consider rerunning with 'localHub=TRUE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- ExperimentHub()
- .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
- tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
- tryCatchList(expr, classes, parentenv, handlers)
- tryCatchOne(expr, names, parentenv, handlers[[1L]])
- value[3L]
- stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'")
Attempt 4:
This code was used in R in Linux command line and it worked however, when I chose to run the commands I needed in R Markdown I still could not get rmSNPandCH to work:
library(ExperimentHub)
library(httr)
setExperimentHubOption("PROXY", "my_proxy")
proxy = getExperimentHubOption("PROXY")
GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3", proxy="my_proxy")
The following code was run in R Markdown:
m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05)
I got the following error:
Assuming valid proxy connection through 'my_proxy' If you experience connection issues consider using 'localHub=TRUE'
Warning message: "Could not check database for updates. Database source currently unreachable. This should only be a temporary interruption. Using previously cached version." Error in value[3L]: failed to connect reason: Failed to connect to bioconductor.org port 443: Connection timed out Consider rerunning with 'localHub=TRUE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- ExperimentHub()
- .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
- tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
- tryCatchList(expr, classes, parentenv, handlers)
- tryCatchOne(expr, names, parentenv, handlers[[1L]])
- value[3L]
- stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'")
Attempt 5:
I then went to the command line in Linux and ran the following:
wget https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3
Attempt 5 Error:
Then when I tried to run the m.noSNPs <- rmSNPandCH(m, dist=2, mafcut=0.05) command I got the following error:
Assuming valid proxy connection through 'my_proxy' If you experience connection issues consider using 'localHub=TRUE'
Warning message: "Could not check database for updates. Database source currently unreachable. This should only be a temporary interruption. Using previously cached version." Error in value[3L]: failed to connect reason: Failed to connect to bioconductor.org port 443: Connection timed out Consider rerunning with 'localHub=TRUE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- ExperimentHub()
- .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
- tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
- tryCatchList(expr, classes, parentenv, handlers)
- tryCatchOne(expr, names, parentenv, handlers[[1L]])
- value[3L]
- stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'")
Attempt 6:
I ran the following in command line:
export my_proxy_1
export my_proxy_2
Attempt 6 Error:
Then restarted my Markdown from scratch to see if it would work and for the rmSNPandCH I used I got the following error:
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE' If offline, please also see BiocManager vignette section on offline use
snapshotDate(): 2023-01-20
Error: File not previously downloaded. Run with 'localHub=FALSE' Traceback:
- rmSNPandCH(m, dist = 2, mafcut = 0.05)
- eh[["EH3130"]]
- eh[["EH3130"]]
- .local(x, i, j = j, ...)
- stop("File not previously downloaded.\n", " Run with 'localHub=FALSE'", . call. = FALSE)
- I also tried to see if I could use this Troubleshoot The Hubs manual (https://bioconductor.org/packages/devel/bioc/vignettes/AnnotationHub/inst/doc/TroubleshootingTheCache.html#group-hubcache-access) - however, I am not sure how I can use it in this case for this issue
I am trying to use the rmSNPandCH command for my own data can someone tell me how to navigate around these errors? Can you give me sample code to do so?