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

clump_data error API error? [Error in mtfrm.default(list(url = "http://gwas-api.mrcieu.ac.uk/ld/clump", : cannot mtfrm] #555

Open
sj2614 opened this issue Aug 26, 2024 · 4 comments

Comments

@sj2614
Copy link

sj2614 commented Aug 26, 2024

Hi, I keep encountering errors when conducting clumping. Both TwoSampleMR and ieugwasr packages have been updated. Any insight is appreciated!!

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

sleep_exposure <- format_data(short_long_sleep_ukb_final, type = "exposure")
sleep_exposure<-clump_data(sleep_exposure)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping C0YOTH, 2835 variants, using EUR population reference
Removing 2829 of 2835 variants due to LD with other variants or absence from LD reference panel
Clumping IR1VnE, 1105 variants, using EUR population reference
Removing 1080 of 1105 variants due to LD with other variants or absence from LD reference panel
Clumping 6yiZWv, 3661 variants, using EUR population reference
No encoding supplied: defaulting to UTF-8.
Error in mtfrm.default(list(url = "http://gwas-api.mrcieu.ac.uk/ld/clump", :
cannot mtfrm

@MRCIEU MRCIEU deleted a comment Aug 26, 2024
@remlapmot
Copy link
Contributor

I have deleted previous comment. Please explain URLs to random files.

@JaikumarMuniswamy
Copy link

JaikumarMuniswamy commented Jan 22, 2025

Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping ebi-a-GCST003566, 22 variants, using EUR population reference
No encoding supplied: defaulting to UTF-8.
Error in mtfrm.default(list(url = "https://api.opengwas.io/api/ld/clump", :
cannot mtfrm

I am facing this issue currently , how to solve it ? Help will be appreciated .

@YuandanZhang
Copy link

Hi I had the same issue too.
somebody at this place suggested: options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
this fix worked for some ones, but not fix my problem.

library("ieugwasr")
options(ieugwasr_api = 'gwas-api.mrcieu.ac.uk/')
ieugwasr::api_status()
Uptime and maintenance information: https://status.opengwas.io
[API] Version: 4.0.0
[References] LD reference panel: Available
[References] 1000 genomes annotation VCF: Available
[References] PLINK executable: Available
[Services] Metadata: Operational
[Services] Associations: Operational
[Services] PheWAS: Operational
[Services] Logging: Operational
[Services] Pipeline: Operational
[Statistics] N records: 346836238801
[Statistics] N datasets: 50198
[Statistics] N public datasets: 50040
[Statistics] N requests processed in the past hour: 3432

tmp1=subset (TMP, pval.exposure < 5e-80)
head(tmp1)

A tibble: 6 × 14

chr.exposure pos.exposure effect_allele.exposure other_allele.exposure beta.exposure se.exposure eaf.exposure

1 1 54780928 C T -0.338 0.0152 0.00267
2 1 54940809 T C -0.317 0.0148 0.00316
3 1 54945907 A G -0.177 0.00624 0.0133
4 1 54982575 A G -0.302 0.00774 0.00869
5 1 55004480 T C -0.174 0.00525 0.0188
6 1 55020123 T C -0.0309 0.00154 0.719

ℹ 7 more variables: pval.exposure , SNP , samplesize.exposure , exposure ,

mr_keep.exposure , pval_origin.exposure , id.exposure

dim(tmp1)
[1] 4391 14
LDL_exp_dat=clump_data(tmp1)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping EzINXB, 4391 variants, using EUR population reference
No encoding supplied: defaulting to UTF-8.
Error in mtfrm.default(list(url = "https://api.opengwas.io/api/ld/clump", :
cannot mtfrm

I also look for info on clump loccally, mention ld_clump, please advise?

@tjerol
Copy link

tjerol commented Feb 27, 2025

I had the same error that was occuring because i forgot to ad the JWT string, this might be the case for you as well?

See this link for how to add it: https://rdrr.io/github/MRCIEU/ieugwasr/man/ld_clump.html

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

No branches or pull requests

5 participants