Closed brinrosenthal closed 2 months ago
Please update your ieugwasr and TwoSampleMR packages.
If you are on Windows or macOS you can update both packages with one command as follows
install.packages("TwoSampleMR", repos = c("https://mrcieu.r-universe.dev", "https://cloud.r-project.org"))
Hi there,
I have tried updating both packages. The issue still remains. I ran the code snippet I found in this previous post (https://github.com/MRCIEU/TwoSampleMR/issues/173).
In that example, 4 of 6 variants were removed by clump_data. However when I run it, all 6 variants are removed. I have tried it with 100,000 SNPs from my summary stats data, and all 100,000 SNPs were removed. I am wondering if it has something to do with the server being down? https://gwas-api.mrcieu.ac.uk/
Any help much appreciated!
library(TwoSampleMR)
d <- tibble(SNP=c("rs4575098", "rs11585858", "rs6690215", "rs4844600", "rs12037841", "rs4266886"), pval.exposure = c(1.896396e-10,5.047090e-10,4.935515e-08,1.176308e-14,2.144842e-10,8.165758e-16))
a <- clump_data(d)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping qDp6J3, 6 variants, using EUR population reference
Removing 6 of 6 variants due to LD with other variants or absence from LD reference panel
gwas-api.mrcieu.ac.uk is being phased out.
Packages now use https://api.opengwas.io/api/ by default and there is no need to change it.
Check by
> options("ieugwasr_api")
$ieugwasr_api
[1] "https://api.opengwas.io/api/"
If it still gives the old URL, run
> ieugwasr::select_api()
API: public: https://api.opengwas.io/api/
> library(TwoSampleMR)
> d <- tibble(SNP=c("rs4575098", "rs11585858", "rs6690215", "rs4844600", "rs12037841", "rs4266886"), pval.exposure = c(1.896396e-10,5.047090e-10,4.935515e-08,1.176308e-14,2.144842e-10,8.165758e-16))
> a <- clump_data(d)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping bKbAHc, 6 variants, using EUR population reference
Removing 4 of 6 variants due to LD with other variants or absence from LD reference panel
> a
# A tibble: 2 × 3
SNP pval.exposure id.exposure
<chr> <dbl> <chr>
1 rs4575098 1.90e-10 bKbAHc
2 rs4266886 8.17e-16 bKbAHc
> sessionInfo()
R version 4.2.3 (2023-03-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 14.5
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[5] purrr_1.0.2 readr_2.1.5 tidyr_1.3.0 tibble_3.2.1
[9] ggplot2_3.5.1 tidyverse_2.0.0 TwoSampleMR_0.6.6
loaded via a namespace (and not attached):
[1] pillar_1.9.0 compiler_4.2.3 ieugwasr_1.0.1 tools_4.2.3
[5] pkgload_1.3.2 timechange_0.2.0 jsonlite_1.8.8 lifecycle_1.0.4
[9] gtable_0.3.5 pkgconfig_2.0.3 rlang_1.1.4 cli_3.6.3
[13] rstudioapi_0.14 curl_5.2.1 withr_3.0.0 httr_1.4.7
[17] generics_0.1.3 vctrs_0.6.5 hms_1.1.3 grid_4.2.3
[21] GwasDataImport_0.1.99 tidyselect_1.2.1 glue_1.7.0 data.table_1.15.4
[25] R6_2.5.1 fansi_1.0.6 tzdb_0.4.0 magrittr_2.0.3
[29] scales_1.3.0 colorspace_2.1-0 utf8_1.2.4 stringi_1.8.4
[33] munsell_0.5.1
ahh I see. Unfortunately still no luck! options("ieugwasr_api") returns the correct address, but all 6 SNPs are still filtered out :( See screenshot below
Results generated before switch the URL may still in the cache. Could you open a fresh Jupyter Notebook and start from scratch? And post the output of sessionInfo()
.
Please also provide $user$account_id and $client$your_ip in the output of ieugwasr::user()
. Do not post your names or email.
Could you upload the entire notebook?
Yes I just tried restarting the kernel, same issue. Notebook attached. Thank you so much for helping look into this issue! LD_clump.md
This step has actually failed. You need a token (JWT) set up to use the service.
ieugwasr::user()
Response [https://api.opengwas.io/api/user]
Date: 2024-07-23 21:06
Status: 401
Content-Type: application/json
Size: 211 B
{"message": "From 1st May 2024 you must provide a token (JWT) alongside most ...
Expected output:
> ieugwasr::user()
Important note: do not share your token with others as it is equivalent to a password.
$user
...
$user$account_id
[1] "2812c88e-8e5d-37b9-8729-xxxxxxxxxxxx"
...
$client$your_ip
[1] "xxx.xxx.xxx.xxx"
thank you very much! I will try setting the token
Yes!! It works now!!! Thanks so much.
Hi, a quick question whether there is any limit for the number of SNPs to be clumped. The clump_data function works fine when I have <1000 SNPs, but it removes all variants when I have 90k SNPs. I wonder if I am missing anything Please look at vignettes for options on running this locally if you need to run many instances of this command.
==== Clumping bw5nGd, 322 variants, using EUR population reference Removing 313 of 322 variants due to LD with other variants or absence from LD reference panel [1] 4 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping RQSDSS, 92095 variants, using EUR population reference Removing 92095 of 92095 variants due to LD with other variants or absence from LD reference panel [1] 6 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping EPXirE, 87119 variants, using EUR population reference Removing 87119 of 87119 variants due to LD with other variants or absence from LD reference panel [1] 7 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping gJGAJg, 75807 variants, using EUR population reference Removing 75807 of 75807 variants due to LD with other variants or absence from LD reference panel
Hi, a quick question whether there is any limit for the number of SNPs to be clumped. The clump_data function works fine when I have <1000 SNPs, but it removes all variants when I have 90k SNPs. I wonder if I am missing anything Please look at vignettes for options on running this locally if you need to run many instances of this command.
==== Clumping bw5nGd, 322 variants, using EUR population reference Removing 313 of 322 variants due to LD with other variants or absence from LD reference panel [1] 4 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping RQSDSS, 92095 variants, using EUR population reference Removing 92095 of 92095 variants due to LD with other variants or absence from LD reference panel [1] 6 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping EPXirE, 87119 variants, using EUR population reference Removing 87119 of 87119 variants due to LD with other variants or absence from LD reference panel [1] 7 Please look at vignettes for options on running this locally if you need to run many instances of this command. Clumping gJGAJg, 75807 variants, using EUR population reference Removing 75807 of 75807 variants due to LD with other variants or absence from LD reference panel
Hi there, it looks like the server is down at https://gwas-api.mrcieu.ac.uk/. I have been getting this error message since 7/26. Wondering if you could provide any estimate of when the server will be up and running again?
Thank you so much!