Al-Murphy / MungeSumstats

Rapid standardisation and quality control of GWAS or QTL summary statistics
https://doi.org/doi:10.18129/B9.bioc.MungeSumstats
75 stars 15 forks source link

Add local chain file option for MungeSumstats::liftover # enhancement #183

Closed laleoarrow closed 7 months ago

laleoarrow commented 7 months ago

Downloading chain files from the UCSC server is unnecessary and time-consuming, especially when dealing with a large amount of data requiring base position transformation. Allowing the option to load previously downloaded chain files would significantly enhance speed (as it only needs to be downloaded once) and reduce the load on the UCSC server.

Al-Murphy commented 7 months ago

Hey! Thanks for this and the PR - I will implement these changes with a few modifications so it is more generally useable.I'll also add some unit tests. Just to note though, get_chain_file() already has functionality to not download files more than once so it actually isn't that much of an issue but I agree having the option to use local versions is worthwhile.

Secondly, I'll propagate the parameter to format_sumstats() function as this will be the function most people use in the package. Going to close the PR and make these changes locally.

I'll add you as a contributor to the package README. Also worth you having a look at the changes I made (v 1.11.10), there was a a bit extra required from your PR to get it to work and worth being aware if you contribute again! Thanks!