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

Provide liftover to other genome builds #50

Closed bschilder closed 3 years ago

bschilder commented 3 years ago

Currently, MungeSumstats detects the current genome build but does not do liftover to one genome build or another. Would be awesome to implement this.

I extracted the functions needed to do this from XGR, since XGR can be a bit tricky to install and this is the only part I needed for liftover.

https://github.com/RajLabMSSM/echolocatoR/blob/master/R/xLiftOver.R

Al-Murphy commented 3 years ago

Might be a 'nicer' solution to got with a Bioconductor version of a liftover package: https://www.bioconductor.org/packages/release/workflows/html/liftOver.html it requires GRanges but if we do this as the last step before saving/outputting and not do it by default should be okay

bschilder commented 3 years ago

that sounds good too! should be easy enough to convert with MungeSumstats::to_GRanges

bschilder commented 3 years ago

Implemented a bioc-based version of this in echoLD with these two functions: https://github.com/RajLabMSSM/echoLD/blob/main/R/liftover.R https://github.com/RajLabMSSM/echoLD/blob/main/R/get_chain_file.R

They seems to be working pretty well. Feel free to copy these over to MungeSumstats, or I can if you prefer.

Al-Murphy commented 3 years ago

Great, be brilliant good to use that here too then!

I don' think I'll have time to get to this in the near future just to let you know in case you need it for some work you're doing.

Al-Murphy commented 3 years ago

This has been implemented in 1.1.19