mr_lasso function in MendelianRandomization package returning 0 (non-NA) Cases

Hi there! I'm fairly new to R and have been navigating my way around performing sensitivity analysis in a two-sample mendelian randomization study. I am using the TwoSampleMendelianRandomization package, with my exposure data directly from the API public:, and a .txt file for my outcome data. My trouble is this: I have two exposures "ukb-b-10817" and "ukb-b-589" I am testing on my outcome "Anorexia" from my txt file.
Performing mr_lasso using the following for the exposure "ukb-b-10817"

MRInputObject <- mr_input(bx = dat$beta.exposure, 
                          bxse = dat$se.exposure, 
                          by = dat$beta.outcome, 
                          byse = dat$se.outcome)
lasso <-mr_lasso(MRInputObject)

produces the S4 MRInputObject with no issues and a lasso result, however, when using "ukb-b-589", the following error message comes up:
Error in, y, offset = offset, singular.ok = singular.ok, ...) : **
** 0 (non-NA) cases

When viewing the MRInputObject, the "effect_allele", "other_allele", "eaf" and "correlation" objects all had values "NA". I corrected the first three objects using the following:

  > MRInputObject@effect_allele <-dat$effect_allele.outcome
> MRInputObject@other_allele <-dat$other_allele.outcome
> MRInputObject@eaf <-dat$eaf.exposure

however the correlation value is still NA and the same error appears after re-running the code.

I think its an issue with the exposure data because the outcome data for the exposure "ukb-b-10817" works perfectly fine with the same txt file.
Any help would be appreciated, thank you !

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.