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 16 forks source link

Cache liftover chain files #93

Closed bschilder closed 2 years ago

bschilder commented 2 years ago

Storing chain files to a package-specific cache means the user won't have to re-download the chain file each time.

get_chain_file <- function( 
....
                           save_dir = tools::R_user_dir(package = "echotabix",
                                                        which = "cache"),
....
)

Might also be nice to export the liftover function since this could be generally useful.

I"ll make these changes at some point and push, if that's cool with you @Al-Murphy

Al-Murphy commented 2 years ago

More than happy for the liftover to be made external.

Just on the chain files, we have local versions in the package in case the user doesn't have internet access. Also the chain files are cached so only really need to download once (and this is fast - they are small) I like to keep this download in case the chain files are ever updated. If we moved to that method we would need to update with any changes. So overall I think the current method is probably okay but let me know if I'm missing something good about the alternative?

bschilder commented 2 years ago

Ohhh, i see. I was basing this off a (possibly old) version I had adapted for echotabix. You're totally right, these are cached in a slightly different way.

Will still do the export tho. Thanks!

bschilder commented 2 years ago

Done! Plus some upgrades/new params to the liftover function.