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

Clumping stopping without error potentially due to tempfile() #37

Open
Sabor117 opened this issue Jul 19, 2023 · 0 comments
Open

Clumping stopping without error potentially due to tempfile() #37

Sabor117 opened this issue Jul 19, 2023 · 0 comments

Comments

@Sabor117
Copy link

Hi all,

I have recently encountered an issue when running clumping using the ieugwasr::ld_clump() function (this is using ieugwasr_0.1.5).

Rather than an issue with the ieugwasr package, I actually suspect this may be an issue with the local file system and HPC I am using and may be due to the location of where the script is saving temporary files.

I see that ld_clump() calls ld_clump_local() if you provide a local version of plink for conducting the clumping and that within this function there is the following:

fn <- tempfile()
write.table(data.frame(SNP = dat[["rsid"]], P = dat[["pval"]]), 
        file = fn, row.names = F, col.names = T, quote = F)
fun2 <- paste0(shQuote(plink_bin, type = shell), " --bfile ", 
        shQuote(bfile, type = shell), " --clump ", shQuote(fn, 
            type = shell), " --clump-p1 ", clump_p, " --clump-r2 ", 
        clump_r2, " --clump-kb ", clump_kb, " --out ", shQuote(fn, 
            type = shell))
system(fun2)

I.e. It creates a tempfile() and then this is used in --out and --clump. I wonder if it would be possible to have a version of this where you can optionally provide a tmpdir for this file, in case this is clashing with mine (and other's) file systems?

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

1 participant