explodecomputer / tryx

Other
10 stars 3 forks source link

MR-Tryx fails with identifier other than x #20

Open Schmytzi opened 3 years ago

Schmytzi commented 3 years ago

Summary

Calling Tryx$mrtryx fails with an error if the Tryx object is stored in a variable with an identifier other than x.

To Reproduce

library(TwoSampleMR)
library(tryx)
a <- extract_instruments("ukb-b-20175")
b <- extract_outcome_data(a$SNP, "ieu-a-7", access_token=NULL)
dat <- harmonise_data(a,b)
y <- Tryx$new(dat)
y$mrtryx()

Expected result: Output from an MR-Tryx analysis, like in your guide. Observed result:

Error in y$mrtryx() : object 'x' not found