MRCIEU / TwoSampleMR

R package for performing 2-sample MR using MR-Base database
https://mrcieu.github.io/TwoSampleMR
Other
420 stars 176 forks source link

running MR PRESSO within TwoSampleMR #444

Open bujnism opened 11 months ago

bujnism commented 11 months ago

Hello,

I ran an MR for my GWAS data as exposure and various phenotypes as the outcome. When I ran MR PRESSO wrapped it worked fine. However, when I converted the exposure data to outcome and used the various phenotypes as exposure I am getting an error which appears to be a formatting isssue, but I cannot determine the cause of it. I am really hoping you might have some insight into this error.

CODE:

resPRESSO<-run_mr_presso(dat_HToutcome,NbDistribution = 10000)

OUTPUT: Intelligence || id:ebi-a-GCST006250 - outcome systolic blood pressure || id:ieu-b-38 - outcome Alzheimer's disease || id:ieu-b-2 - outcome Celiac disease || id:ebi-a-GCST005523 - outcome HDL cholesterol || id:ieu-b-109 - outcome Height || id:ieu-a-89 - outcome Coronary heart disease || id:ieu-a-9 - outcome diastolic blood pressure || id:ieu-b-39 - outcome Rheumatoid arthritis || id:ebi-a-GCST90013534 - outcome Sporadic miscarriage || id:ebi-a-GCST011888 - outcome Schizophrenia || id:ieu-b-5070 - outcome apolipoprotein A-I || id:ieu-b-107 - outcome Ankylosing spondylitis || id:ebi-a-GCST005529 - outcome triglycerides || id:ieu-b-111 - outcome Heart rate || id:ieu-a-1056 - outcome Atrial fibrillation || id:ebi-a-GCST006414 - outcome Autism Spectrum Disorder || id:ieu-a-1185 - outcome apolipoprotein B || id:ieu-b-108 - outcome bipolar disorder || id:ieu-b-41 - outcome multiple sclerosis || id:ieu-b-18 - outcome Depression (broad) || id:ebi-a-GCST005902 - outcome body mass index || id:ieu-b-40 - outcome Sarcoidosis (non-Lofgren's syndrome) || id:ebi-a-GCST005543 - outcome Psoriasis || id:ebi-a-GCST90019017 - outcome Fasting glucose || id:ebi-a-GCST90002232 - outcome Juvenile idiopathic arthritis (oligoarticular or rheumatoid factor-negative polyarticular) || id:ebi-a-GCST005528 - outcome Major depression || id:ieu-b-102 - outcome WARNING: MR-PRESSO failed for Intelligence || id:ebi-a-GCST006250 systolic blood pressure || id:ieu-b-38 Alzheimer's disease || id:ieu-b-2 Celiac disease || id:ebi-a-GCST005523 HDL cholesterol || id:ieu-b-109 Height || id:ieu-a-89 Coronary heart disease || id:ieu-a-9 diastolic blood pressure || id:ieu-b-39 Rheumatoid arthritis || id:ebi-a-GCST90013534 Sporadic miscarriage || id:ebi-a-GCST011888 Schizophrenia || id:ieu-b-5070 apolipoprotein A-I || id:ieu-b-107 Ankylosing spondylitis || id:ebi-a-GCST005529 triglycerides || id:ieu-b-111 Heart rate || id:ieu-a-1056 Atrial fibrillation || id:ebi-a-GCST006414 Autism Spectrum Disorder || id:ieu-a-1185 apolipoprotein B || id:ieu-b-108 bipolar disorder || id:ieu-b-41 multiple sclerosis || id:ieu-b-18 Depression (broad) || id:ebi-a-GCST005902 body mass index || id:ieu-b-40 Sarcoidosis (non-Lofgren's syndrome) || id:ebi-a-GCST005543 Psoriasis || id:ebi-a-GCST90019017 Fasting glucose || id:ebi-a-GCST90002232 Juvenile idiopathic arthritis (oligoarticular or rheumatoid factor-negative polyarticular) || id:ebi-a-GCST005528 Major depression || id:ieu-b-102 Heel bone mineral density || id:ebi-a-GCST006979 Sjogren's syndrome (SPA correction) || id:ebi-a-GCST90013929 HbA1C || id:ieu-b-103 Systemic lupus erythematosus || id:ebi-a-GCST90011866 Chronic gastritis || id:ebi-a-GCST90018825 LDL cholesterol || id:ieu-b-110 Type 1 diabetes || id:ebi-a-GCST90000529 Myocardial infarction || id:ieu-a-798 Ulcerative colitis || id:ieu-a-970 Cardiovascular disease || id:ebi-a-GCST90038595 Heart failure || id:ebi-a-GCST009541 Sarcoidosis (Lofgren's syndrome) || id:ebi-a-GCST005540 Total cholesterol || id:ieu-a-301 Triglycerides || id:ieu-a-302 Type 2 diabetes || id:ebi-a-GCST006867 Type 2 diabetes (adjusted for BMI) || id:ebi-a-GCST007518 -> outcome <simpleError in data.frame(..., check.names = FALSE): arguments imply differing number of rows: 1, 0> Warning messages: 1: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 2: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 3: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 4: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 5: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 6: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 7: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA 8: In MRPRESSO::mr_presso(BetaOutcome = "beta.outcome", BetaExposure = "beta.exposure", : No outlier were identified, therefore the results for the outlier-corrected MR are set to NA

bujnism commented 11 months ago

dataset is formatted as shown below: head (dat_HToutcome) SNP effect_allele.exposure other_allele.exposure effect_allele.outcome other_allele.outcome beta.exposure beta.outcome eaf.exposure eaf.outcome 1 rs10416600 A G A G 0.01120980 0.0640 NA 0.6406 2 rs10424978 A C A C -0.00252119 -0.0653 NA 0.6022 3 rs10458381 T C T C -0.00148579 0.0654 NA 0.3427 4 rs10748781 A C A C 0.00112712 -0.0684 NA 0.5829 5 rs10751647 C T C T -0.00605318 -0.0455 NA 0.4212 6 rs1079418 G A G A 0.00456223 -0.0919 NA 0.3009 remove palindromic ambiguous id.outcome se.outcome pval.outcome samplesize.outcome outcome mr_keep.outcome pval_origin.outcome data_source.outcome 1 FALSE FALSE FALSE erdGwZ 0.0084 3.32e-14 969564 outcome TRUE reported textfile 2 FALSE FALSE FALSE erdGwZ 0.0082 1.84e-15 972970 outcome TRUE reported textfile 3 FALSE FALSE FALSE erdGwZ 0.0078 4.13e-17 1030430 outcome TRUE reported textfile 4 FALSE FALSE FALSE erdGwZ 0.0076 2.67e-19 1027030 outcome TRUE reported textfile 5 FALSE FALSE FALSE erdGwZ 0.0078 6.34e-09 1030430 outcome TRUE reported textfile 6 FALSE FALSE FALSE erdGwZ 0.0089 4.72e-25 972968 outcome TRUE reported textfile exposure chr.exposure pos.exposure se.exposure pval.exposure mr_keep.exposure pval_origin.exposure id.exposure action 1 Intelligence || id:ebi-a-GCST006250 19 18386063 0.00284947 8.35507e-05 TRUE reported ebi-a-GCST006250 2 2 Intelligence || id:ebi-a-GCST006250 19 4837557 0.00546896 6.45100e-01 TRUE reported ebi-a-GCST006250 2 3 Intelligence || id:ebi-a-GCST006250 1 19769243 0.00288502 6.06599e-01 TRUE reported ebi-a-GCST006250 2 4 Intelligence || id:ebi-a-GCST006250 10 101283330 0.00282487 6.89600e-01 TRUE reported ebi-a-GCST006250 2 5 Intelligence || id:ebi-a-GCST006250 11 306884 0.00289488 3.65603e-02 TRUE reported ebi-a-GCST006250 2 6 Intelligence || id:ebi-a-GCST006250 6 166047034 0.00297020 1.24500e-01 TRUE reported ebi-a-GCST006250 2 mr_keep 1 TRUE 2 TRUE 3 TRUE 4 TRUE 5 TRUE 6 TRUE