Issues Using DMRcate and rmSNPandCH
2
1
Entering edit mode
15 months ago
Indira ▴ 10

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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. eh[["EH3130"]]
  3. eh[["EH3130"]]
  4. .local(x, i, j = j, ...)
  5. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. eh[["EH3130"]]
  3. eh[["EH3130"]]
  4. .local(x, i, j = j, ...)
  5. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. eh[["EH3130"]]
  3. eh[["EH3130"]]
  4. .local(x, i, j = j, ...)
  5. 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:

  1. GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3", . proxy = "my_proxy")
  2. request_perform(req, hu$handle$handle)
  3. request_fetch(req$output, req$url, handle)
  4. request_fetch.write_memory(req$output, req$url, handle)
  5. 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:

  1. GET("https://experimenthub.bioconductor.org/metadata/experimenthub.sqlite3")
  2. request_perform(req, hu$handle$handle)
  3. request_fetch(req$output, req$url, handle)
  4. request_fetch.write_memory(req$output, req$url, handle)
  5. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. ExperimentHub()
  3. .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
  4. tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
  5. tryCatchList(expr, classes, parentenv, handlers)
  6. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7. value[3L]
  8. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. ExperimentHub()
  3. .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
  4. tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
  5. tryCatchList(expr, classes, parentenv, handlers)
  6. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7. value[3L]
  8. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. ExperimentHub()
  3. .Hub("ExperimentHub", hub, cache, proxy, localHub, ask, ...)
  4. tryCatch({ . db_date <- .restrictDateByVersion(db_path) . }, error = function(err) { . stop("failed to connect", "\n reason: ", conditionMessage(err), . "\n Consider rerunning with 'localHub=TRUE'") . })
  5. tryCatchList(expr, classes, parentenv, handlers)
  6. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7. value[3L]
  8. 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:

  1. rmSNPandCH(m, dist = 2, mafcut = 0.05)
  2. eh[["EH3130"]]
  3. eh[["EH3130"]]
  4. .local(x, i, j = j, ...)
  5. stop("File not previously downloaded.\n", " Run with 'localHub=FALSE'", . call. = FALSE)

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?

DMRcate R • 1.1k views
ADD COMMENT
1
Entering edit mode
14 months ago
t.peters ▴ 20

Hi Indira,

Apologies for the delay in getting to your post. For the moment, DMRcate does not have compatibility with EPICv2. However, I anticipate it will be updated in the coming months. I will update the ExperimentHub() data object with SNP information from the new manifest, as well as cross-hybridising probes, and update rmSNPandCH() to include this functionality. Thank you for your patience.

As for the ExperimentHub() error, I think this is a separate connectivity issue. Try posting your EH issues directly to the Bioconductor support page (https://www.bioconductor.org/help/support/) and I imagine someone will be able to help you with this.

Cheers, Tim

ADD COMMENT
1
Entering edit mode
4 weeks ago
t.peters ▴ 20

Hi Indira,

DMRcate can now call DMRs from EPICv2 in the current devel version: https://www.bioconductor.org/packages/devel/bioc/html/DMRcate.html. You can find the vignette for EPICv2 assays here: https://www.bioconductor.org/packages/devel/bioc/vignettes/DMRcate/inst/doc/EPICv2.pdf

This version will become 3.0 in the next Bioconductor release, available May 1st.

If you're interested, you can also check out our latest paper in BMC Genomics (https://bmcgenomics.biomedcentral.com/articles/10.1186/s12864-024-10027-5), where we take a deep dive into many aspects of EPICv2, including reproducibility and multiple probes mapping to the same CpG site.

Cheers, Tim

ADD COMMENT

Login before adding your answer.

Traffic: 1583 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6