MRCIEU / TwoSampleMR

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

available_outcomes() Error: Argument 1 must be a data frame or a named atomic vector #220

Open Xuemin-Wang opened 4 years ago

Xuemin-Wang commented 4 years ago

Dear authors and users,

The issue below occurred while trying TwoSampleMR. Looks like it's expecting an argument.

library(TwoSampleMR) [>] TwoSampleMR version 0.5.5 [>] New: Option to use non-European LD reference panels for clumping etc [>] Some studies temporarily quarantined to verify effect allele [>] See news(package='TwoSampleMR') and https://gwas.mrcieu.ac.uk for further details

ao <- available_outcomes() API: public: http://gwas-api.mrcieu.ac.uk/ Error: Argument 1 must be a data frame or a named atomic vector. Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/rlang_error> Argument 1 must be a data frame or a named atomic vector. Backtrace:

  1. TwoSampleMR::available_outcomes()
  2. ieugwasr::gwasinfo(access_token = access_token)
  3. dplyr::bind_rows(out) Run rlang::last_trace() to see the full context. rlang::last_trace() <error/rlang_error> Argument 1 must be a data frame or a named atomic vector. Backtrace: █
  4. └─TwoSampleMR::available_outcomes()
  5. └─ieugwasr::gwasinfo(access_token = access_token)
  6. ├─dplyr::bind_rows(out) %>% dplyr::select("id", "trait", dplyr::everything())
  7. │ └─base::eval(lhs, parent, parent)
  8. │ └─base::eval(lhs, parent, parent)
  9. └─dplyr::bind_rows(out)

I think access_token is not mandatory in the latest version, though I've tried ao <- available_outcomes(access_token=NULL) but encountered the same error.

ao <- available_outcomes(access_token=NULL) Error: Argument 1 must be a data frame or a named atomic vector. Run rlang::last_error() to see where the error occurred.

Any comment will be appreciated.

Regards, patrick

basilmars commented 1 year ago

Same problem. Help, please!

zincfingers89 commented 1 year ago

Hi I am also experiencing this problem, and very frequently finding server code 502 when running any TwosampleMR functions sadly.

weishao9 commented 4 months ago

Same problem. Have you solved it?

kwongsiufung commented 4 months ago

Same problem for me as well :(

AngeTKL commented 4 months ago

same problem, did you by chance find the solution ?

weishao9 commented 4 months ago

Server issues, I solve this by code

options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')

Ali-mhm commented 1 month ago

Dear authors and users,

The issue below occurred while trying TwoSampleMR. Looks like it's expecting an argument.

library(TwoSampleMR) [>] TwoSampleMR version 0.5.5 [>] New: Option to use non-European LD reference panels for clumping etc [>] Some studies temporarily quarantined to verify effect allele [>] See news(package='TwoSampleMR') and https://gwas.mrcieu.ac.uk for further details

ao <- available_outcomes() API: public: http://gwas-api.mrcieu.ac.uk/ Error: Argument 1 must be a data frame or a named atomic vector. Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/rlang_error> Argument 1 must be a data frame or a named atomic vector. Backtrace:

  1. TwoSampleMR::available_outcomes()
  2. ieugwasr::gwasinfo(access_token = access_token)
  3. dplyr::bind_rows(out) Run rlang::last_trace() to see the full context.

rlang::last_trace() <error/rlang_error> Argument 1 must be a data frame or a named atomic vector. Backtrace: █

  1. └─TwoSampleMR::available_outcomes()
  2. └─ieugwasr::gwasinfo(access_token = access_token)
  3. ├─dplyr::bind_rows(out) %>% dplyr::select("id", "trait", dplyr::everything())
  4. │ └─base::eval(lhs, parent, parent)
  5. │   └─base::eval(lhs, parent, parent)
  6. └─dplyr::bind_rows(out)

I think access_token is not mandatory in the latest version, though I've tried ao <- available_outcomes(access_token=NULL) but encountered the same error.

ao <- available_outcomes(access_token=NULL) Error: Argument 1 must be a data frame or a named atomic vector. Run rlang::last_error() to see where the error occurred.

Any comment will be appreciated.

Regards, patrick

i had same issue, you can use these couple lines of code:

server<- options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
outcomes<-available_outcomes(server)

Originally posted by @weishao9 in https://github.com/MRCIEU/TwoSampleMR/issues/220#issuecomment-2168307481

MiaoranZhang commented 3 weeks ago

Server issues, I solve this by code

options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')

great