Last updated: 2021-03-04

Checks: 7 0

Knit directory: PSYMETAB/

This reproducible R Markdown analysis was created with workflowr (version 1.6.0). 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(20191126) 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 version displayed above was the version of the Git repository at the time these results were generated.

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:    ._docs
    Ignored:    .drake/
    Ignored:    analysis/.Rhistory
    Ignored:    analysis/._GWAS.Rmd
    Ignored:    analysis/._data_processing_in_genomestudio.Rmd
    Ignored:    analysis/._quality_control.Rmd
    Ignored:    analysis/GWAS/
    Ignored:    analysis/GWAS_results.knit.md
    Ignored:    analysis/GWAS_results.utf8.md
    Ignored:    analysis/PRS/
    Ignored:    analysis/QC/
    Ignored:    analysis/Rlogo2.png
    Ignored:    analysis/figure/
    Ignored:    analysis/rplot.jpg
    Ignored:    analysis_prep_10_clustermq.out
    Ignored:    analysis_prep_11_clustermq.out
    Ignored:    analysis_prep_12_clustermq.out
    Ignored:    analysis_prep_1_clustermq.out
    Ignored:    analysis_prep_2_clustermq.out
    Ignored:    analysis_prep_3_clustermq.out
    Ignored:    analysis_prep_4_clustermq.out
    Ignored:    analysis_prep_5_clustermq.out
    Ignored:    analysis_prep_6_clustermq.out
    Ignored:    analysis_prep_7_clustermq.out
    Ignored:    analysis_prep_8_clustermq.out
    Ignored:    analysis_prep_9_clustermq.out
    Ignored:    data/processed/
    Ignored:    data/raw/
    Ignored:    packrat/lib-R/
    Ignored:    packrat/lib-ext/
    Ignored:    packrat/lib/
    Ignored:    process_init_10_clustermq.out
    Ignored:    process_init_11_clustermq.out
    Ignored:    process_init_12_clustermq.out
    Ignored:    process_init_13_clustermq.out
    Ignored:    process_init_14_clustermq.out
    Ignored:    process_init_15_clustermq.out
    Ignored:    process_init_16_clustermq.out
    Ignored:    process_init_17_clustermq.out
    Ignored:    process_init_18_clustermq.out
    Ignored:    process_init_19_clustermq.out
    Ignored:    process_init_1_clustermq.out
    Ignored:    process_init_20_clustermq.out
    Ignored:    process_init_21_clustermq.out
    Ignored:    process_init_22_clustermq.out
    Ignored:    process_init_2_clustermq.out
    Ignored:    process_init_3_clustermq.out
    Ignored:    process_init_4_clustermq.out
    Ignored:    process_init_5_clustermq.out
    Ignored:    process_init_6_clustermq.out
    Ignored:    process_init_7_clustermq.out
    Ignored:    process_init_8_clustermq.out
    Ignored:    process_init_9_clustermq.out
    Ignored:    prs_1_clustermq.out
    Ignored:    prs_2_clustermq.out
    Ignored:    prs_3_clustermq.out
    Ignored:    prs_4_clustermq.out
    Ignored:    prs_5_clustermq.out
    Ignored:    prs_6_clustermq.out
    Ignored:    prs_7_clustermq.out
    Ignored:    prs_8_clustermq.out
    Ignored:    ukbb_analysis_10_clustermq.out
    Ignored:    ukbb_analysis_11_clustermq.out
    Ignored:    ukbb_analysis_12_clustermq.out
    Ignored:    ukbb_analysis_13_clustermq.out
    Ignored:    ukbb_analysis_14_clustermq.out
    Ignored:    ukbb_analysis_15_clustermq.out
    Ignored:    ukbb_analysis_16_clustermq.out
    Ignored:    ukbb_analysis_17_clustermq.out
    Ignored:    ukbb_analysis_18_clustermq.out
    Ignored:    ukbb_analysis_19_clustermq.out
    Ignored:    ukbb_analysis_1_clustermq.out
    Ignored:    ukbb_analysis_20_clustermq.out
    Ignored:    ukbb_analysis_21_clustermq.out
    Ignored:    ukbb_analysis_22_clustermq.out
    Ignored:    ukbb_analysis_2_clustermq.out
    Ignored:    ukbb_analysis_3_clustermq.out
    Ignored:    ukbb_analysis_4_clustermq.out
    Ignored:    ukbb_analysis_5_clustermq.out
    Ignored:    ukbb_analysis_6_clustermq.out
    Ignored:    ukbb_analysis_7_clustermq.out
    Ignored:    ukbb_analysis_8_clustermq.out
    Ignored:    ukbb_analysis_9_clustermq.out

Untracked files:
    Untracked:  Rlogo.png
    Untracked:  Rlogo2.png
    Untracked:  analysis_prep.log
    Untracked:  download_impute.log
    Untracked:  extract_sig.log
    Untracked:  grs.log
    Untracked:  init_analysis.log
    Untracked:  output/PSYMETAB_GWAS_UKBB_comparison.csv
    Untracked:  output/PSYMETAB_GWAS_UKBB_comparison2.csv
    Untracked:  output/PSYMETAB_GWAS_baseline_CEU_result.csv
    Untracked:  output/PSYMETAB_GWAS_subgroup_CEU_result.csv
    Untracked:  output/coffee_consumed_Neale_UKBB_analysis.csv
    Untracked:  process_init.log
    Untracked:  prs.log
    Untracked:  rplot.jpg
    Untracked:  test
    Untracked:  ukbb_analysis.log

Unstaged changes:
    Modified:   analysis/plans.Rmd
    Modified:   cache_log.csv
    Modified:   post_impute.log

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 R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view them.

File Version Author Date Message
Rmd c96d28f Jenny Sjaarda 2021-03-04 Rebuilding index
Rmd 941b66d Jenny Sjaarda 2021-03-02 add new Rmd files and respective html files
Rmd 85955b3 Jenny Sjaarda 2020-06-23 Update site
html 85955b3 Jenny Sjaarda 2020-06-23 Update site
html 46477dd Jenny Sjaarda 2019-12-06 Build site.
Rmd b503ef0 Sjaarda Jennifer Lynn 2019-12-06 add more details to website
html d1e539c Jenny Sjaarda 2019-12-06 Build site.
Rmd 487b5f5 Sjaarda Jennifer Lynn 2019-12-06 update website, add qc description
html 9f1ba5e Jenny Sjaarda 2019-12-06 Build site.
Rmd d480e35 Jenny 2019-12-04 misc annotations
html 12223b3 Jenny Sjaarda 2019-12-02 Build site.
Rmd dafe346 Jenny 2019-12-02 modify index
Rmd 0dd02a7 Jenny 2019-12-02 modify website
html 2849dcb Jenny Sjaarda 2019-12-02 wflow_git_commit(all = T)
Rmd 3d512c2 Sjaarda Jennifer Lynn 2019-12-02 modify website and drake plans
Rmd 8e743a8 Sjaarda Jennifer Lynn 2019-11-27 drakeplan
html 97b2b48 Jenny 2019-11-26 Build site.
Rmd 2db9bcf Jenny 2019-11-26 wflow_publish(all = T)
html 2db9bcf Jenny 2019-11-26 wflow_publish(all = T)
html 5fb939e Jenny Sjaarda 2019-11-26 Build site.
Rmd 7bae873 Jenny Sjaarda 2019-11-26 Start workflowr project.

Last-changedate minimal R version

This website contains all information and results about this research project.

Project details and overview can be found in the About page.

See Setup for details on setting up the project and the various analyses for this project.

See Drake plans for a visual representation of analytical pipelines.

Useful shortcuts

  1. Data sources for details on data sources and origins.
  2. Overview of processing in genomestudio.
  3. Genetic quality control.
  4. Phenotypic quality control.
  5. Genetic data extraction protocol.
  6. GWAS methods.
  7. GWAS results.

Powered by drake + workflowr

Useful papers

Current Analyses

GWAS in PSYMETAB (our study)

  • Run within various subsets.
  • Subsets were defined based on drug use, for various drug groups of interest (we had 9 groups of drugs that we analyzed).
  • Phenotypes included various measures of the evolution of BMI: BMI change, BMI slope, weighted slope for SE, etc.
  • Restricted to only European subset.
  • Phenotypes were residualized for: age, age^2, sex, PC1-20, follow-up time, follow-up time^2, and baseline BMI (Zoltan: we discussed this last time, but to again clarify - should follow-up time be included, it seems redundant if we are analyzing slope which already considers time between BMI measures).

GWAS in UKBB

  • Phenotype: BMI slope.
  • GWAS restricted to participants having at least 2 BMI measures restricted to unrelated, British individuals.
  • Phenotype was first residualized for: age, sex, PC1-40, and baseline BMI

COMPARISON BETWEEN PSYMETAB and UKBB:

  • In PSYMETAB, I took only endpoints involving slope since this would represent the best comparison to UKBB.
  • I extracted nominally significant hits in PSYMETAB (p < 5e-06) (as there were very few less with p< 5e-08).
  • For these SNPs, I compared with UKBB using a standard heterogeneity statistic.
  • Limited to only GW-sig results based on het p-value.
  • Identified 68 GW-significant SNPs (i.e. SNPs that show significant difference between some PSYMETAB subset and UKBB based on a BMI slope measure, for only those SNPs in PSYMETAB that have p < 5e-06).
  1. Test top SNPs from our GWAS (within drug subgroups) with BMI in UKBB within a group defined as under the same drug as the association in our psychiatric cohort (using drug information data in UKBB). Note that in contrast to our psychiatric cohort, we don’t have information for how long a UKBB participant has been taking a specific drug.
  2. To justify (1), ensure that BMI is a good proxy for change in BMI (i.e. the phenotype used in the psychiatric cohort), correlate BMI at end of follow-up with BMI slope in our psychiatric cohort.
  3. For rare (0.01 < MAF < 0.05) SNPs, perform permutation test (i.e. shuffle phenotype ~1M times and perform same association: pheno ~ SNP + covars) to see if the effect found with the real data (i.e. unshuffled phenotype) is significantly larger than using the 1M shuffled phenotypes and not just some artifact of low AF.
  4. Meta-analyze GWAS results across drug subgroups and use Cochran’s Q test (i.e. test for heterogeneity) to determine effects differ across subgroups.

Acknowledgements

Primary analysis performed by: Jenny Sjaarda. Project supervisor: Professor Chin Bin Eap. Analysis support: Professor Zoltan Kutalik.

This work has been supported by the Swiss National Science Foundation.


sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

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

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

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

other attached packages:
[1] workflowr_1.6.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3      rprojroot_1.3-2 packrat_0.5.0   digest_0.6.25  
 [5] later_1.0.0     R6_2.4.1        backports_1.1.6 git2r_0.26.1   
 [9] magrittr_1.5    evaluate_0.14   stringi_1.4.5   rlang_0.4.5    
[13] fs_1.3.1        promises_1.1.0  whisker_0.4     rmarkdown_1.18 
[17] tools_3.5.3     stringr_1.4.0   glue_1.4.0      yaml_2.2.0     
[21] httpuv_1.5.2    xfun_0.11       compiler_3.5.3  htmltools_0.4.0
[25] knitr_1.26