Software Open Access

TwoSampleMR R package

Hemani, Gibran; Haycock, Philip; Zheng, Jie; Gaunt, Tom; Elsworth, Ben; Palmer, Tom

  • Move car package to Suggests to allow TwoSampleMR to install on R between versions 4.0.0 and 4.1.0
  • In DESCRIPTION use pkgdepends syntax for MRPRESSO package due its repository name being different to the package name so that installing TwoSampleMR under pak continues to work
  • Various minor code tweaks to fix 2 R CMD check notes
  • Add Cairo package to Suggests list (thanks @hdraisma)
  • Fix error in outcome data vignette (thanks @hdraisma)
  • Some p-values that should have been ~0 were being stored as 1 in the elasticsearch database. This has now been fixed and those datasets have been clumped again to re-define the tophits. A full list of affected GWAS is available here:
  • Updated steiger filtering to use effective sample size for case control studies (thanks to @niekverw)
  • Fixed issue with tri-allelic SNPs in harmonisation. Credit to Clare Horscroft (@chorscroft) for spotting the error and fixing
  • Fixed an issue with experimental version of local multivariable MR method. Credit to Mischa Lundberg (@MischaLundberg).
  • Catching edge cases for retrieving sample size meta data
  • Updating default rsq estimation function to use beta and standard error instead of p-value, should improve numerical stability
  • Allow chr and pos to be read in from local summary data files
  • When reading in local data without p-values, editing the inferred p-value method to be two-sided
  • All images in the vignettes (and hence also in the rendered pkgdown website) now have accompanying alt text descriptions
  • The accompanying website for the package now uses Bootstrap 5, which means a search facility is enabled
  • The NAMESPACE has been simplified, hence the package load time is very slightly improved
Please cite this software using the metadata from 'preferred-citation'.
Files (3.0 MB)
Name Size
3.0 MB Download
All versions This version
Views 1,1393
Downloads 1480
Data volume 886.3 MB0 Bytes
Unique views 1,0543
Unique downloads 1170


Cite as