Open laleoarrow opened 1 month ago
Hi,
I have managed to reduce the MRlap input and index the IVs using just IVW with the following code, and it runs smoothly now. However, I have a few questions:
1.Why is the $MRcorrection$MRcorrection$observed_effect different from the results obtained by IVW? Since I used the same IVs, shouldn’t the uncorrected effect be the same as the IVW results? 2.Which index stands for the P value for the LDSC rg?
hm3_snp.list <- fread(hm3_path) %>% select(SNP)
iv_snp.list <- dat_h_mrlap %>% select(SNP)
snp.list <- rbind(hm3_snp.list, iv_snp.list) %>% unique()
exposure_data <- exposure_data %>% filter(SNP %in% snp.list$SNP) %>% select(-Neff)
outcome_data <- outcome_data %>% filter(SNP %in% snp.list$SNP) %>% select(-Neff)
# MR-lap
A <- MRlap(exposure = exposure_data,
exposure_name = exposure_name,
outcome = outcome_data,
outcome_name = outcome_name,
ld = ld_path,
hm3 = hm3_path,
do_pruning = FALSE,
user_SNPsToKeep = dat_h_mrlap$SNP
)
Thank you for potential assistance!
Update: This could be solved by merge the input with hm3 snp list in advance. However, the IVW-MR results in MRlap is slightly different from IVW results from the tsmr pipeline using TwoSampleMR (I did provide the MRlap with the same IV that is used for tsmr by add the flag
user_SNPsToKeep = dat_h_mrlap$SNP
). Any thought is appreciated!Original Q: Hi, all! I am trying to use MRlap as a support to my IVW results but Im having problems with the running. Maybe I got somewhere wrongly understood here. Here is my code as instructed. It runs way more slowly than the demo example on a Macbook Pro (2023) M3max with 128g RAM.
Should I merge the full summary data with the
w_hm3.noMHC.snplist
in advance? If so, does that affect the IV selection when performing MRlap based MR analysis? Any thought is appreciated!Here is my log