Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in r$status_code : $ operator is invalid for atomic vectors #482

Open
Cyanyyq opened this issue Mar 14, 2024 · 12 comments
Open

Error in r$status_code : $ operator is invalid for atomic vectors #482

Cyanyyq opened this issue Mar 14, 2024 · 12 comments

Comments

@Cyanyyq
Copy link

Cyanyyq commented Mar 14, 2024

Please make sure that this is a feature request! If you have questions about how to use TwoSampleMR please use the Discussions function instead.

Describe the feature you would like to see (required)

exp_dat <- extract_instruments(outcomes='ukb-b-11842',p1=5e-07)
Error in r$status_code : $ operator is invalid for atomic vectors

Provide a clear and concise description
Error in r$status_code : $ operator is invalid for atomic vectors

Describe the importance of this feature to your research (required)

Describe the anticipated value of this feature to the wider research community (required)

Contribute a solution (optional)

If you are willing to contribute to the development of this feature, please submit a pull request and/or briefly describe your proposed solution

@lixiaodong1999
Copy link

anybody know this

@ikram2779
Copy link

ikram2779 commented Mar 19, 2024

having same issue since updating package regardless of the version.

ao <- available_outcomes()
Error in r$status_code : $ operator is invalid for atomic vectors

@ReznovHuang
Copy link

ReznovHuang commented Mar 19, 2024

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

edit: mine problem is occured when ao <- available_outcomes(access_token=NULL)

@ikram2779
Copy link

thank you. it worked as i

library(ieugwasr)

@xiaoyong2499
Copy link

options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
it make twosampleMR package work again!
Thanks a lot

@baiym13
Copy link

baiym13 commented Mar 24, 2024

I also met this bug. Anyone can solve it?

@docZ9
Copy link

docZ9 commented Mar 25, 2024

options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
it make twosampleMR package work again!
but it then present "Error in if (nrow(d) == 0) return(NULL) : 参数长度为零"

@SYFSQMR
Copy link

SYFSQMR commented Mar 28, 2024

options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
It worked. Thanks to the people who came up with it. Thanks!

@Ayor1
Copy link

Ayor1 commented Apr 1, 2024

Exp_Out_Harmonized_Clumped <- clump_data(harmonized,clump_kb = 10000,clump_r2 = 0.1,clump_p1 = 1,clump_p2 = 1,pop = "EUR")
........
Clumping G2OjrT, 136968 variants, using EUR population reference
Error in r$status_code : $ operator is invalid for atomic vectors

This worked for me
options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
library(ieugwasr)

Thanks

@cainiaomengxin
Copy link

library(ieugwasr)
options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
After that, after I ran the following code, I still got the error "Error in r$status_code : $ operator is invalid for atomic vectors"

@zkhamis
Copy link

zkhamis commented Jun 10, 2024

I used it work once then it gave the same error msg and stopped working with this error:No encoding supplied: defaulting to UTF-8.
Error in mtfrm.default(list(url = "http://gwas-api.mrcieu.ac.uk/ld/clump", :
cannot mtfrm

@kobe24king
Copy link

ao <- available_outcomes(options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/'))
wrong:api_query("gwasinfo", opengwas_jwt = opengwas_jwt):
The query to MR-Base exceeded 300 seconds and timed out. Potential reasons:
- You have a bad internet connection
- The query was very large and it timed out
- You have maxed out your allowance, and kept submitting requests, which led to your IP address being temporarily blocked. See here for details: https://api.opengwas.io/api/#allowance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests