MRCIEU / TwoSampleMR

R package for performing 2-sample MR using MR-Base database
https://mrcieu.github.io/TwoSampleMR
Other
440 stars 177 forks source link

[BUG]: Can't authenticate token or use basic TwoSampleMR features like extract_outcome_data #462

Open ketzelehs opened 11 months ago

ketzelehs commented 11 months ago

Hi, I have used TwoSampleMR for many years. Now code I used to be able to run doesn't. I've tried updating the package, updating other packages, getting a new authentication, and nothing works. I've tried my personal computer and a university cluster.

I'm trying several different ways just to extract SNPs from outcome GWAS. Example: out_dat <- extract_outcome_data( snps = exp_dat$SNP[1:5], outcomes = df$id, proxies = TRUE)

My data are fine.

Here is the error I see when trying to get an authentication token in case that was the issue.

Can you help?

Access blocked: MR Base’s request is invalid

the.ketzelehs@gmail.com You can’t sign in because MR Base sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error If you are a developer of MR Base, see error details. Error 400: invalid_request

ketzelehs commented 11 months ago

Also, I get a similar error now when trying to use other code: "Error: Could not authenticate via any gargle cred function"

Example:

mr

f <- file.path(system.file(package="pQTLtools"),"tests","Ins.csv") ivs <- format_data(read.csv(f)) caption4 <- "ABO/LIFR variants and CHD/FEV1" kable(ivs, caption=paste(caption4,"(instruments)"),digits=3)

ids <- c("ieu-a-7","ebi-a-GCST007432") pqtlMR(ivs, ids) result <- read.delim("pQTL-combined-result.txt",header=TRUE)

Error: Could not authenticate via any gargle cred function

swvanderlaan commented 7 months ago

@remlapmot and @explodecomputer Perhaps it is good to point out to people to use the development version, as this seems to work.

I also got this error - see screenshot. Screenshot 2024-04-05 at 14 50 38

I used:

ieugwasr::get_access_token()

Which leads me to google.

And when I did:

ao_mr <- TwoSampleMR::available_outcomes()

I got the same message.

Next, I installed the development version:

remotes::install_github('MRCIEU/ieugwasr')

After restarting R the above functions worked.