metamaden/recountmethylation

pwrEWAS_itable() not found

Closed this issue · 3 comments

Dear Sean,
it seems to me that the revised pwrEWAS function has been removed from the location that has been given in the vignette.
I can neither source it from R, nor reach it via my webbrowser.

revised_function_url <- paste0("https://github.com/metamaden/pwrEWAS/", "blob/master/inst/revised_functions/pwrEWAS_revised.R?raw=TRUE")
devtools::source_url(revised_function_url)
Error in devtools::source_url(revised_function_url) : Not Found (HTTP 404).
Error: [ENOENT] Failed to remove '/tmp/RtmpOYSkKg/file60a8925d4821e': no such file or directory

Would you be able to fix that (or am I doing something wrong)?

Many thanks and best regards
Klemens

Hi Klemens,

Thank you for reporting this issue, and I apologize for the inconvenience.

The pwrEWAS_itable() function can now be accessed as a gist rather than a standalone package/repo. The gist is available here, and using the following from an active R session should allow you to access the function:

devtools::source_gist("https://gist.github.com/metamaden/953b128c230e32ef1beecbc2695e93c1")

I will update the power analysis vignette accordingly, and changes should appear in the Bioconductor development branch soon.

Thank you for your patience, and please let me know if you have any further questions.

Best regards,

Sean

Dear Sean,
thanks for your help.
I was able to source the pwrEWAS_itable() function from the provided url, but the arguments seem to have changed:

I cannot provide a value for maxCnt.tau -> ...unused argument (maxCnt.tau = maxctau)...

And if I omit maxCnt.tau -> Finding tau...Error in getTau(targetDmCpGs, targetDelta[d], methPara, detectionLimit, :
could not find function "getTau"

Could you also provide a link to getTau()? It also doesnt seem to be included in the original package...

Many thanks again an best regards
Klemens

Hi Klemens,

It looks like the function getTau() is in the latest pwrEWAS (v0.99.64) package GH repo at:

https://github.com/stefangraw/pwrEWAS/blob/master/R/functions.R

To download and view the function from your R session, you could run:

fileName <- "functions.R"
urlTau <- file.path("https://github.com/stefangraw/pwrEWAS/blob/master/R",fileName)
download.file(url = urlTau, destfile = fileName)
source(fileName)
getTau

It looks like it contains the maxCnt parameter you are after, defined as a variable. Unfortunately, because it is a variable and not an argument, you may need to manually redefine the variable or partially rewrite the function if you want to be able to set a new maxCnt value.

Best regards,

Sean