Update returned harmonized data object + NEWS to v0.0.3.4#27
Open
lcpilling wants to merge 6 commits inton-mounier:masterfrom
Open
Update returned harmonized data object + NEWS to v0.0.3.4#27lcpilling wants to merge 6 commits inton-mounier:masterfrom
lcpilling wants to merge 6 commits inton-mounier:masterfrom
Conversation
To be consistent with format for TwoSampleMR::mr()
"effect_allele" etc
Contributor
Author
|
Another small quality of life improvement added to this branch... MRlap can now take GWAS catalog formatted summary statistics using their default headers |
Contributor
Author
|
Actually just realised it is really easy to bundle a data frame of the TwoSampleMR output with additional row for corrected IVW effect. Means that the output of MRlap can be inspected a plotted very easily now: # run standard MRlap analysis
mrlap_res = MRlap::MRlap(
exposure = gwas1,
exposure_name = "gwas1",
outcome = gwas2,
outcome_name = "gwas2",
ld = ld,
hm3 = hm3)
# check out results table
mrlap_res$results_table
#> id.exposure id.outcome outcome exposure method nsnp b se pval
#> 1 GORD CRS CRS GORD Inverse variance weighted 38 0.1258992 0.05436226 0.020562052
#> 2 GORD CRS CRS GORD Inverse variance weighted (corrected) 38 0.1545762 0.07318573 0.034677164
#> 3 GORD CRS CRS GORD Weighted median 38 0.1578384 0.05514316 0.004205286
#> 4 GORD CRS CRS GORD Simple mode 38 0.2228619 0.11716894 0.064970474
#> 5 GORD CRS CRS GORD Weighted mode 38 0.2078488 0.11262181 0.072972196
#> 6 GORD CRS CRS GORD MR Egger 38 0.7187816 0.55849830 0.206311804
# get scatter plot of IVs with "standard" estimates & the new corrected estimate too
p1 <- TwoSampleMR::mr_scatter_plot(mrlap_res$results_table, mrlap_res$harmonised_mr_data)I know trivial updates but just saves incremental time each time I run things |
Correct link to my GitHub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Example of how update affects using MRlap in a pipeline: