Last updated: 2021-09-15

Checks: 7 0

Knit directory: proxyMR/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it's best to always run the code in an empty environment.

The command set.seed(20210602) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version f7fc22e. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    FP_data.RData
    Ignored:    _targets/
    Ignored:    analysis/bgenie_GWAS/
    Ignored:    analysis/data_setup/
    Ignored:    analysis/process_Neale.out
    Ignored:    analysis/traitMR/
    Ignored:    data/Neale_SGG_directory_12_07_2021.csv
    Ignored:    data/Neale_SGG_directory_15_07_2021.csv
    Ignored:    data/processed/
    Ignored:    data/raw/
    Ignored:    household_MR_exhaustive_summary.rds
    Ignored:    output/figures/
    Ignored:    output/tables/traitMR/
    Ignored:    proxyMR_comparison.RData
    Ignored:    proxyMR_figure_data.RData
    Ignored:    proxymr_100_clustermq.out
    Ignored:    proxymr_101_clustermq.out
    Ignored:    proxymr_102_clustermq.out
    Ignored:    proxymr_103_clustermq.out
    Ignored:    proxymr_104_clustermq.out
    Ignored:    proxymr_105_clustermq.out
    Ignored:    proxymr_106_clustermq.out
    Ignored:    proxymr_107_clustermq.out
    Ignored:    proxymr_108_clustermq.out
    Ignored:    proxymr_109_clustermq.out
    Ignored:    proxymr_10_clustermq.out
    Ignored:    proxymr_110_clustermq.out
    Ignored:    proxymr_111_clustermq.out
    Ignored:    proxymr_112_clustermq.out
    Ignored:    proxymr_113_clustermq.out
    Ignored:    proxymr_114_clustermq.out
    Ignored:    proxymr_115_clustermq.out
    Ignored:    proxymr_116_clustermq.out
    Ignored:    proxymr_117_clustermq.out
    Ignored:    proxymr_118_clustermq.out
    Ignored:    proxymr_119_clustermq.out
    Ignored:    proxymr_11_clustermq.out
    Ignored:    proxymr_120_clustermq.out
    Ignored:    proxymr_121_clustermq.out
    Ignored:    proxymr_122_clustermq.out
    Ignored:    proxymr_123_clustermq.out
    Ignored:    proxymr_124_clustermq.out
    Ignored:    proxymr_125_clustermq.out
    Ignored:    proxymr_126_clustermq.out
    Ignored:    proxymr_127_clustermq.out
    Ignored:    proxymr_128_clustermq.out
    Ignored:    proxymr_129_clustermq.out
    Ignored:    proxymr_12_clustermq.out
    Ignored:    proxymr_130_clustermq.out
    Ignored:    proxymr_131_clustermq.out
    Ignored:    proxymr_132_clustermq.out
    Ignored:    proxymr_133_clustermq.out
    Ignored:    proxymr_134_clustermq.out
    Ignored:    proxymr_135_clustermq.out
    Ignored:    proxymr_136_clustermq.out
    Ignored:    proxymr_137_clustermq.out
    Ignored:    proxymr_138_clustermq.out
    Ignored:    proxymr_139_clustermq.out
    Ignored:    proxymr_13_clustermq.out
    Ignored:    proxymr_140_clustermq.out
    Ignored:    proxymr_14_clustermq.out
    Ignored:    proxymr_15_clustermq.out
    Ignored:    proxymr_16_clustermq.out
    Ignored:    proxymr_17_clustermq.out
    Ignored:    proxymr_18_clustermq.out
    Ignored:    proxymr_19_clustermq.out
    Ignored:    proxymr_1_clustermq.out
    Ignored:    proxymr_20_clustermq.out
    Ignored:    proxymr_21_clustermq.out
    Ignored:    proxymr_22_clustermq.out
    Ignored:    proxymr_23_clustermq.out
    Ignored:    proxymr_24_clustermq.out
    Ignored:    proxymr_25_clustermq.out
    Ignored:    proxymr_26_clustermq.out
    Ignored:    proxymr_27_clustermq.out
    Ignored:    proxymr_28_clustermq.out
    Ignored:    proxymr_29_clustermq.out
    Ignored:    proxymr_2_clustermq.out
    Ignored:    proxymr_30_clustermq.out
    Ignored:    proxymr_31_clustermq.out
    Ignored:    proxymr_32_clustermq.out
    Ignored:    proxymr_33_clustermq.out
    Ignored:    proxymr_34_clustermq.out
    Ignored:    proxymr_35_clustermq.out
    Ignored:    proxymr_36_clustermq.out
    Ignored:    proxymr_37_clustermq.out
    Ignored:    proxymr_38_clustermq.out
    Ignored:    proxymr_39_clustermq.out
    Ignored:    proxymr_3_clustermq.out
    Ignored:    proxymr_40_clustermq.out
    Ignored:    proxymr_41_clustermq.out
    Ignored:    proxymr_42_clustermq.out
    Ignored:    proxymr_43_clustermq.out
    Ignored:    proxymr_44_clustermq.out
    Ignored:    proxymr_45_clustermq.out
    Ignored:    proxymr_46_clustermq.out
    Ignored:    proxymr_47_clustermq.out
    Ignored:    proxymr_48_clustermq.out
    Ignored:    proxymr_49_clustermq.out
    Ignored:    proxymr_4_clustermq.out
    Ignored:    proxymr_50_clustermq.out
    Ignored:    proxymr_51_clustermq.out
    Ignored:    proxymr_52_clustermq.out
    Ignored:    proxymr_53_clustermq.out
    Ignored:    proxymr_54_clustermq.out
    Ignored:    proxymr_55_clustermq.out
    Ignored:    proxymr_56_clustermq.out
    Ignored:    proxymr_57_clustermq.out
    Ignored:    proxymr_58_clustermq.out
    Ignored:    proxymr_59_clustermq.out
    Ignored:    proxymr_5_clustermq.out
    Ignored:    proxymr_60_clustermq.out
    Ignored:    proxymr_61_clustermq.out
    Ignored:    proxymr_62_clustermq.out
    Ignored:    proxymr_63_clustermq.out
    Ignored:    proxymr_64_clustermq.out
    Ignored:    proxymr_65_clustermq.out
    Ignored:    proxymr_66_clustermq.out
    Ignored:    proxymr_67_clustermq.out
    Ignored:    proxymr_68_clustermq.out
    Ignored:    proxymr_69_clustermq.out
    Ignored:    proxymr_6_clustermq.out
    Ignored:    proxymr_70_clustermq.out
    Ignored:    proxymr_71_clustermq.out
    Ignored:    proxymr_72_clustermq.out
    Ignored:    proxymr_73_clustermq.out
    Ignored:    proxymr_74_clustermq.out
    Ignored:    proxymr_75_clustermq.out
    Ignored:    proxymr_76_clustermq.out
    Ignored:    proxymr_77_clustermq.out
    Ignored:    proxymr_78_clustermq.out
    Ignored:    proxymr_79_clustermq.out
    Ignored:    proxymr_7_clustermq.out
    Ignored:    proxymr_80_clustermq.out
    Ignored:    proxymr_81_clustermq.out
    Ignored:    proxymr_82_clustermq.out
    Ignored:    proxymr_83_clustermq.out
    Ignored:    proxymr_84_clustermq.out
    Ignored:    proxymr_85_clustermq.out
    Ignored:    proxymr_86_clustermq.out
    Ignored:    proxymr_87_clustermq.out
    Ignored:    proxymr_88_clustermq.out
    Ignored:    proxymr_89_clustermq.out
    Ignored:    proxymr_8_clustermq.out
    Ignored:    proxymr_90_clustermq.out
    Ignored:    proxymr_91_clustermq.out
    Ignored:    proxymr_92_clustermq.out
    Ignored:    proxymr_93_clustermq.out
    Ignored:    proxymr_94_clustermq.out
    Ignored:    proxymr_95_clustermq.out
    Ignored:    proxymr_96_clustermq.out
    Ignored:    proxymr_97_clustermq.out
    Ignored:    proxymr_98_clustermq.out
    Ignored:    proxymr_99_clustermq.out
    Ignored:    proxymr_9_clustermq.out
    Ignored:    renv/library/
    Ignored:    renv/staging/
    Ignored:    traits_corr2_update.rds

Untracked files:
    Untracked:  .nfs0000000200133c860035c099
    Untracked:  analysis/figures_scratch.Rmd
    Untracked:  analysis/group_meeting_pres_figures_080921.Rmd

Unstaged changes:
    Modified:   analysis/AM_MR_summary.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/update_meeting_06_09_2021.Rmd) and HTML (docs/update_meeting_06_09_2021.html) files. If you've configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd f7fc22e Jenny Sjaarda 2021-09-15 update all update meetings Rmds
Rmd 1ec15e2 jennysjaarda 2021-09-06 update meeting 6/09/21

1 Last meeting summary.

  • Need to sum \(\rho\) and \(\gamma\) together and calculate difference of the sum from \(\omega\) (previously only calculated differences between each pair, not sum).
  • Use less stringent BF calculation for AM MR (for calculating trends across bins).

2 Model summaries.

Version Author Date
fda4843 jennysjaarda 2021-09-14

Version Author Date
1afb033 jennysjaarda 2021-09-14

3 Questions.

  1. Impact of meta-analyzing after MR is calculated?
  2. Trend across bins: should it be a weighted linear model?
  3. Less stringent BF correction:
    • Calculate correlation matrix of all 131 traits tested.
    • Perform PCs on the resulting corr matrix.
    • Number of tests = # of PCs needed until variance explained is > 99.5%.
    • Resulting # of tests: 76.
  4. Filter by same-person MR or proxyMR?
  5. Summed \(\rho\) and \(\gamma\) and compared this to omega, for the variance - it's just the sum of these two variances?
  6. MV MR: \(X \rightarrow Z \rightarrow Y\)
    • Drop Z's if not significant in MV MR (i.e. \(Y \sim X + Z_1 + Z_2 + Z_3...\))
    • Do we drop from the model itself and recompute the beta-coefficients? Or simply not include them in the result sum?

4 AM summary.

A summary of single trait MR within couples (AM MR) can be found here.

5 ProxyMR

Restricting XY pairs:

  • If we base it on a significant MR in the same individuals (same MR: \(X \rightarrow Y\)), the number of tests is: 8542.
  • If we base it on a significant proxyMR (\(X_{i} \rightarrow Y_{p}\)), the number of tests is: 3930.

Can we use the PC multiple-test correction we applied above here, or just use conservative raw BF correction?

Comparison of omega to rho + gamma instead of just rho or gamma alone. There are more significant results using both, would have expected there to be less. An example of one such result is shown below.

omega_vs_gam_BF_sig_meta Frq
FALSE 2918
TRUE 876
omega_vs_rho_BF_sig_meta Frq
FALSE 2998
TRUE 796
omega_vs_gam_rho_BF_sig_meta Frq
FALSE 2112
TRUE 1682
Info
exposure_ID 1697
outcome_ID 20153_irnt
exposure_description Comparative height size at age 10
outcome_description Forced expiratory volume in 1-second (FEV1), predicted
gam_meta_beta 0.3523655
rho_meta_beta 0.2430959
omega_meta_beta 0.2438396
gam_rho_meta_beta 0.5961995
gam_meta_se 0.01561297
rho_meta_se 0.01483619
omega_meta_se 0.01523505
gam_rho_meta_se 0.02155184
omega_vs_gam_meta_p 0.0000006526668
omega_vs_rho_meta_p 0.9721006
omega_vs_gam_rho_meta_p 0.0000000000000000000000000000000000000001176172

sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /data/sgg2/jenny/bin/R-4.1.0/lib64/R/lib/libRblas.so
LAPACK: /data/sgg2/jenny/bin/R-4.1.0/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] kableExtra_1.3.4   knitr_1.33         DT_0.18.1          forcats_0.5.1     
 [5] stringr_1.4.0      dplyr_1.0.7        purrr_0.3.4        readr_1.4.0       
 [9] tidyr_1.1.3        tibble_3.1.2       ggplot2_3.3.4      tidyverse_1.3.1   
[13] targets_0.5.0.9001 workflowr_1.6.2   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6        svglite_2.0.0     lubridate_1.7.10  ps_1.6.0         
 [5] assertthat_0.2.1  rprojroot_2.0.2   digest_0.6.27     utf8_1.2.1       
 [9] R6_2.5.0          cellranger_1.1.0  backports_1.2.1   reprex_2.0.0     
[13] evaluate_0.14     highr_0.9         httr_1.4.2        pillar_1.6.1     
[17] rlang_0.4.11      readxl_1.3.1      rstudioapi_0.13   data.table_1.14.0
[21] whisker_0.4       callr_3.7.0       rmarkdown_2.9     webshot_0.5.2    
[25] htmlwidgets_1.5.3 igraph_1.2.6      munsell_0.5.0     broom_0.7.7      
[29] compiler_4.1.0    httpuv_1.6.1      modelr_0.1.8      xfun_0.24        
[33] systemfonts_1.0.2 pkgconfig_2.0.3   htmltools_0.5.1.1 tidyselect_1.1.1 
[37] codetools_0.2-18  viridisLite_0.4.0 fansi_0.5.0       crayon_1.4.1     
[41] dbplyr_2.1.1      withr_2.4.2       later_1.2.0       grid_4.1.0       
[45] jsonlite_1.7.2    gtable_0.3.0      lifecycle_1.0.0   DBI_1.1.1        
[49] git2r_0.28.0      magrittr_2.0.1    scales_1.1.1      cli_2.5.0        
[53] stringi_1.6.2     renv_0.13.2-62    fs_1.5.0          promises_1.2.0.1 
[57] xml2_1.3.2        ellipsis_0.3.2    generics_0.1.0    vctrs_0.3.8      
[61] tools_4.1.0       glue_1.4.2        hms_1.1.0         processx_3.5.2   
[65] yaml_2.2.1        colorspace_2.0-1  rvest_1.0.0       haven_2.4.1