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

ld_clump error #40

Open
fabianacz opened this issue Oct 10, 2023 · 3 comments
Open

ld_clump error #40

fabianacz opened this issue Oct 10, 2023 · 3 comments

Comments

@fabianacz
Copy link

I am trying to perform clumping using the 1000 genomes as reference dataset.

Here is my code

clump_data(
summaryset_orru_format,
clump_kb = 10000,
clump_r2 = 0.001,
clump_p1 = 1,
clump_p2 = 1,
pop = "EUR"
)

Error in api_query("ld/clump", query = list(rsid = dat[["rsid"]], pval = dat[["pval"]], :
The query to MR-Base exceeded 300 seconds and timed out. Please simplify the query

I tried another approach. Running local LD operations.

To get a path to plink you can do the following:

devtools::install_github("explodecomputer/genetics.binaRies")
plink <- genetics.binaRies::get_plink_binary()

To get the same LD reference dataset that is used by the API, you can download it directly from here:

http://fileserve.mrcieu.ac.uk/ld/1kg.v3.tgz

and tried this

orru_clump <- ld_clump(
dplyr::tibble(rsid = summaryset_orru$rsid, pval = summaryset_orru$p, id = summaryset_orru$id),
plink_bin = plink,
bfile = "1kg.v3" #this is in the same directory of my R project
)

The outcome is

Clumping ebi-a-GCST90001942, 15141982 variants, using EUR population reference
PLINK v1.90b7 64-bit (16 Jan 2023) www.cog-genomics.org/plink/1.9/
(C) 2005-2023 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to C:\Users\corsfmdg\AppData\Local\Temp\Rtmp63D8xl\file393034026c62.log.
Options in effect:
--bfile 1kg.v3
--clump C:\Users\corsfmdg\AppData\Local\Temp\Rtmp63D8xl\file393034026c62
--clump-kb 10000
--clump-p1 0.99
--clump-r2 0.001
--out C:\Users\corsfmdg\AppData\Local\Temp\Rtmp63D8xl\file393034026c62

65210 MB RAM detected; reserving 32605 MB for main workspace.
Error: Failed to open 1kg.v3.bed.
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'C:\Users\corsfmdg\AppData\Local\Temp\Rtmp63D8xl\file393034026c62.clumped': No such file or directory

@zillurbmb51
Copy link

Unpack the.tgz file using tar zxvf then point the actual plink file which will be "EUR" or something

@fabianacz
Copy link
Author

wow! thanks! Just adding to that -> it only worked for me when I extracted all the .bim .fam .bed files and added all to my working directory. Thanks!

@phyliciasy
Copy link

Hello. I have the same error report as you. I used tar to unzip it and put all the extracted files in my working position.

Do you have some suggestions? Thank you.

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

3 participants