You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please make sure that this is a bug! If you have questions about how to use TwoSampleMR please use the Discussions function instead.
Describe the bug (required)
When running power_prune() with method 2 and assuming a continuous outcome distribution, outcome data which has different values for samplesize produces a mismatch in size between an intermediate data.frame and the iv.se vector used to populate a column in that data.frame.
Describe the current behaviour you observe (required)
Finding proxies for 1 SNPs in outcome ebi-a-GCST000998
Extracting data for 1 SNP(s) from 1 GWAS(s)
Harmonising Body mass index || id:ieu-a-2 (ieu-a-2) and Coronary heart disease || id:ebi-a-GCST000998 (ebi-a-GCST000998)
Harmonising Body mass index || id:ieu-a-2 (ieu-a-2) and Coronary heart disease || id:ieu-a-6 (ieu-a-6)
Harmonising Body mass index || id:ieu-a-2 (ieu-a-2) and Coronary heart disease || id:ieu-a-7 (ieu-a-7)
Harmonising Body mass index || id:ieu-a-2 (ieu-a-2) and Coronary heart disease || id:ieu-a-8 (ieu-a-8)
Harmonising Body mass index || id:ieu-a-2 (ieu-a-2) and Coronary heart disease || id:ieu-a-9 (ieu-a-9)
[1] 1
[1] "Body mass index Coronary heart disease"
[1] "identifying best powered summary set: Body mass index || id:ieu-a-2 ieu-a-2 Coronary heart disease || id:ebi-a-GCST000998 ebi-a-GCST000998"
[1] "identifying best powered summary set: Body mass index || id:ieu-a-2 ieu-a-2 Coronary heart disease || id:ieu-a-6 ieu-a-6"
Error in $<-.data.frame(*tmp*, "iv.se", value = c(0.0513059534662941, : replacement has 47 rows, data has 61
Traceback:
R version 4.4.1 (2024-06-14) -- "Race for Your Life"
Additional context
This was discovered while elaborating an example in the documentation to test the power_prune() function (which doesn't have a complete end-to-end example since the rest of the example on that doc page only deals with a single outcome subset).
The text was updated successfully, but these errors were encountered:
Please make sure that this is a bug! If you have questions about how to use TwoSampleMR please use the Discussions function instead.
Describe the bug (required)
When running power_prune() with method 2 and assuming a continuous outcome distribution, outcome data which has different values for samplesize produces a mismatch in size between an intermediate data.frame and the iv.se vector used to populate a column in that data.frame.
Describe the current behaviour you observe (required)
bmi_exp_dat <- extract_instruments(outcomes = 'ieu-a-2', opengwas_jwt=JWT_TOKEN)
ao <- available_outcomes(opengwas_jwt = JWT_TOKEN)
chd_studies = subset(ao, trait == 'Coronary heart disease')
chd_out_dat <- extract_outcome_data(snps = bmi_exp_dat$SNP, outcomes = chd_studies$id, opengwas_jwt=JWT_TOKEN)
dat <- harmonise_data(
exposure_dat = bmi_exp_dat,
outcome_dat = chd_out_dat
)
dat <- power_prune(dat, method = 2, dist.outcome = "continuous")
Describe the behaviour you expect (required)
Return a pruned dataframe without errors
R code to reproduce the issue (required)
See above
Contribute a solution (optional)
PR 556
System information
Additional context
This was discovered while elaborating an example in the documentation to test the power_prune() function (which doesn't have a complete end-to-end example since the rest of the example on that doc page only deals with a single outcome subset).
The text was updated successfully, but these errors were encountered: