privefl / bigsnpr

R package for the analysis of massive SNP arrays.
https://privefl.github.io/bigsnpr/
183 stars 43 forks source link

standalone LDpred2 command line script #471

Closed espenhgn closed 5 months ago

espenhgn commented 6 months ago

Dear @privefl, For our purpose @deepchocolate, @ofrei, and I have incorporated LDpred2 PRS (auto and infinitesimal model) predictions in a standalone R script here, allowing for predictions in compute environments with Rscript only (non-interactive HPC environments and such without GUI). We've incorporated arguments for parsing input files, column names, etc., e.g.,

$ Rscript ldpred2.R \
 --ldpred-mode auto \
 --geno-file-rds <geno-file>\
 --sumstats <sumstats-file> \
 --out <outputfile>

There is more extensive documentation/examples of usage in this README.

Would it be of interest if we contributed these codes here as an example? The singularity container setup used in the above readme file is not required for the scripts.

privefl commented 5 months ago

Hi, sorry for the late reply. Thanks a lot for your interest in LDpred2 and the hard work in putting such a thorough script.

How did you want to contribute this here? Would you like me to reference this as a link to your GitHub in the LDpred2 tutorial?

espenhgn commented 5 months ago

Hi; also sorry for the slow communication. There are a couple of alternatives for integrating these codes as you noted. There is an examples directory with misc. scripts but I am unsure if this is the best location, given that we have some additional documentation and unit tests.

Had a brief discussion with @deepchocolate last week, and he had an idea to put these codes into a separate git repository that is installable (devtools::install_github('https://github.com/comorment/ldpred2) or similar).

But as a first step, and with the least amount of effort, a mention/link to our implementation would be nice. I suppose it can be added to the LDpred2 vignette?

privefl commented 5 months ago

The examples/ directory just stores the longer examples (but still way shorter than a tutorial) from the documentation.

I'll add a link to the tutorial then.

espenhgn commented 5 months ago

Sounds good -- Thanks a lot!